Re: --delete-missing-args doesn't delete

2019-04-29 Thread MI via rsync
Merci Francis. Yes, that would probably be a way to do it, but I guess it needs correctly escaping the special characters which may appear in file names. (Yes, there are people who use "*" in file names, etc.) So what I'm doing now is using neither --delete-missing-arg nor --files-from, but

Re: --delete-missing-args doesn't delete

2019-04-25 Thread Francis.Montagnac--- via rsync
Hi. On Tue, 23 Apr 2019 16:35:15 +0200 MI via rsync wrote: > If someone has a good suggestion on how to rsync a list of files and > delete from the destination any file that is not listed in --files-from, > that would be welcome. Assuming you are talking about files in a same source directory

Re: --delete-missing-args doesn't delete

2019-04-23 Thread MI via rsync
Thank you Kevin. It seems that I misunderstood the purpose of this --delete-missing-args option. If someone has a good suggestion on how to rsync a list of files and delete from the destination any file that is not listed in --files-from, that would be welcome. Thanks, MI Origi

Re: --delete-missing-args doesn't delete

2019-04-23 Thread Kevin Korb via rsync
--files-from will delete files from the destination that are listed but not existing in the source. It isn't delete what isn't listed. On 4/23/19 5:29 AM, MI via rsync wrote: > I'm generating a list of files to sync, and would like all the files not > in my list to be deleted from the destination

Re: Delete remote folder

2016-06-03 Thread Fabian Cenedese
At 10:27 02.06.2016, Fabian Cenedese wrote: >Content-Transfer-Encoding: 7bit > >Hi > >I'm trying to build a backup system based on rsync. It should >work with different destinations (local, share, remote etc) that's >why I'm looking for ways how every operation can be controlled >from the client si

Re: Delete remote folder

2016-06-03 Thread Fabian Cenedese
At 17:57 02.06.2016, Steven Levine wrote: >>rsync -a --delete empty_local_folder remote_folder_to_delete > >>to get rid of the contents. However the folder itself still remains. So >>after a while I'd have a lot of empty folders. > >This comes up on the list every now and then. > >Here's a snip fr

Re: Delete remote folder

2016-06-02 Thread Steven Levine
In <20160602082722.8F11829233B7@macserver.private>, on 06/02/16 at 10:27 AM, Fabian Cenedese said: Hi Fabian, >rsync -a --delete empty_local_folder remote_folder_to_delete >to get rid of the contents. However the folder itself still remains. So >after a while I'd have a lot of empty folders.

Re: Delete remote folder

2016-06-02 Thread Fabian Cenedese
At 13:22 02.06.2016, you wrote: >Content-Transfer-Encoding: 7bit > >Fabian Cenedese wrote: > >> This script is bash and also uses the "remote shell hacks" using SSH. >> As I want to run it also from Windows I'm looking for a rsync solution. > >Assuming you have control of the server, can you do a

Re: Delete remote folder

2016-06-02 Thread Simon Hobson
Fabian Cenedese wrote: > This script is bash and also uses the "remote shell hacks" using SSH. > As I want to run it also from Windows I'm looking for a rsync solution. Assuming you have control of the server, can you do a bit of semaphore ? Eg, do your backup with rsync, then when it's complet

Re: Delete remote folder

2016-06-02 Thread Simon Hobson
Fabian Cenedese wrote: > Are there pure rsync ways to solve these two problems? Short answer - no I don't think there is. My feeling is that rsync (at least, rsync on it's own) isn't the right tool for the job. One think I would comment on though is that, IMO, making backup policies under the

Re: Delete remote folder

2016-06-02 Thread Fabian Cenedese
At 10:52 02.06.2016, Hans-Christian Jehg wrote: >Content-Transfer-Encoding: 7bit > >Try having a look at this, for inspiration. > >It does require the capability of hard-links on the remote end though... and >it does not resolve your "delete target directory" either, but it might save >you some f

Re: Delete remote folder

2016-06-02 Thread Hans-Christian Jehg
Try having a look at this, for inspiration. It does require the capability of hard-links on the remote end though... and it does not resolve your "delete target directory" either, but it might save you some fiddeling around :-) https://blog.interlinked.org/tutorials/rsync_time_machine.html H

Re: delete not working with multiple source directories

2014-08-17 Thread Robert DuToit
HI kevin, No luck with —relative. I’ll try and see where in the code —delete gets bypassed. Rob On Aug 16, 2014, at 9:27 PM, Kevin Korb wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Does --relative fix it? You almost always want --relative with > multiple sources. > > On

Re: delete not working with multiple source directories

2014-08-16 Thread Robert DuToit
Kevin, I don’t usually use -R unless users choose it -wanting the full directory structure on destination. In this case of course - it doesn’t matter as the three are all at root level. Worth a shot. Will let you know. Thanks, Rob On Aug 16, 2014, at 9:27 PM, Kevin Korb wrote: > -BEGIN

Re: delete not working with multiple source directories

2014-08-16 Thread Kevin Korb
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Does --relative fix it? You almost always want --relative with multiple sources. On 08/16/2014 09:10 PM, Robert DuToit wrote: > Hello All, > > I have lately heard from a couple of people that delete option was > not deleting extraneous files on des

Re: Delete directories without browsing them

2013-08-03 Thread AZ 9901
Le 3 août 2013 à 18:27, Wayne Davison a écrit : > On Sun, Apr 7, 2013 at 2:25 AM, AZ 9901 wrote: > If so, is there a way to tell Rsync the following ? > "delete this top directory and all its files, but stop lacking time with > comparisons against the incl/excl list for each element of this top

Re: Delete directories without browsing them

2013-08-03 Thread Wayne Davison
On Sun, Apr 7, 2013 at 2:25 AM, AZ 9901 wrote: > If so, is there a way to tell Rsync the following ? > "delete this top directory and all its files, but stop lacking time with > comparisons against the incl/excl list for each element of this top > directory" > No, rsync will always make a list o

Re: Delete directories without browsing them

2013-08-03 Thread AZ 9901
Le 6 avr. 2013 à 16:57, AZ 9901 a écrit : > I make my production backups with Rsync. > > > Here is an example of my backup tree on the destination server : > /backups >/2013-04-03 >/2013-04-02 >/2013-04-01 >/2013-03-31 >/2013-03-30 >/2013-03-29 > > At the end of the bac

Re: Delete directories without browsing them

2013-04-07 Thread AZ 9901
Le 7 avr. 2013 à 13:29, Matthias Schniedermeyer a écrit : > On 07.04.2013 11:25, AZ 9901 wrote: >> Le 6 avr. 2013 à 17:15, Matthias Schniedermeyer a écrit : >> >>> On 06.04.2013 16:57, AZ 9901 wrote: Is there a way to tell Rsync to directly delete backup directories at the top of

Re: Delete directories without browsing them

2013-04-07 Thread Matthias Schniedermeyer
On 07.04.2013 11:25, AZ 9901 wrote: > Le 6 avr. 2013 à 17:15, Matthias Schniedermeyer a écrit : > > > On 06.04.2013 16:57, AZ 9901 wrote: > >> > >> Is there a way to tell Rsync to directly delete backup directories at > >> the top of the hierarchy without browsing them ? > > > > No. > > > > Del

Re: Delete directories without browsing them

2013-04-07 Thread AZ 9901
Le 6 avr. 2013 à 17:15, Matthias Schniedermeyer a écrit : > On 06.04.2013 16:57, AZ 9901 wrote: >> >> Is there a way to tell Rsync to directly delete backup directories at >> the top of the hierarchy without browsing them ? > > No. > > Deleting a directory-tree has to be done "file by file" and

Re: Delete directories without browsing them

2013-04-06 Thread Matthias Schniedermeyer
On 06.04.2013 16:57, AZ 9901 wrote: > > Is there a way to tell Rsync to directly delete backup directories at > the top of the hierarchy without browsing them ? No. Deleting a directory-tree has to be done "file by file" and "directory by directory" there is no magic "remove that mountain of fi

Re: delete-during and I/O errors

2012-11-24 Thread Gareth Babb
On Sat, 24 Nov 2012, Kevin Korb wrote: > Rsync should stop deleting as soon as it hits an error unless you are > using --force or --ignore-errors. Most definately not using either, as the correct operation of delete-after shows. > Also, set these in /etc/lvm/lvm.conf: > snapshot_autoextend_

Re: delete-during and I/O errors

2012-11-24 Thread Kevin Korb
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rsync should stop deleting as soon as it hits an error unless you are using --force or --ignore-errors. Also, set these in /etc/lvm/lvm.conf: snapshot_autoextend_threshold = 80 snapshot_autoextend_percent = 20 That will auto-extend your snaps

Re: --delete not working

2012-03-12 Thread John Van Essen
Aren't you missing something in your rsync command? (Hint: subject line) John On Mar 12, 2012, at 14:00, Salatiel Filho wrote: > Hi guys , i need some help. I am trying to make a full sync of two of > my servers. But i noticed a very odd thing. > If i create a directory , for example > /u

Re: --delete not working

2012-03-12 Thread Salatiel Filho
Thanks a lot kevin. []'s Salatiel On Mon, Mar 12, 2012 at 16:18, Kevin Korb wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > This should be all you need (plus the other paths of course): > - --exclude=/proc > > You may also be interested in --one-file-system. > > On 03/12/12 15:16,

Re: --delete not working

2012-03-12 Thread Salatiel Filho
sorry , i was not forgetting that. Just forgot to type when mailing :) []'s Salatiel On Mon, Mar 12, 2012 at 16:16, John Van Essen wrote: > Aren't you missing something in your rsync command?  (Hint: subject line) > >    John > > > On Mar 12, 2012, at 14:00, Salatiel Filho wrote: > >> Hi guys

Re: --delete not working

2012-03-12 Thread Kevin Korb
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 This should be all you need (plus the other paths of course): - --exclude=/proc You may also be interested in --one-file-system. On 03/12/12 15:16, Salatiel Filho wrote: > Actually that is the problem. SOME_FOLDER is /usr/include/sys which > is being

Re: --delete not working

2012-03-12 Thread Salatiel Filho
Actually that is the problem. SOME_FOLDER is /usr/include/sys which is being ignore because of the sys/* exclude. Now i have another problem , how can i exclude the /sys , /proc and /dev for being synced? if i put rsync -avzhH --delete --exclude /proc/* --exclude /dev/* --exclude /sys/* / root

Re: --delete not working

2012-03-12 Thread Kevin Korb
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Does the "SOME_FOLDER" match any of your excludes? You didn't root the excludes with a leading / so you are excluding any directory named proc sys or dev anywhere in the tree. On 03/12/12 15:05, Salatiel Filho wrote: > i rerun removing the -v and i g

Re: --delete not working

2012-03-12 Thread Salatiel Filho
i rerun removing the -v and i get no errors at all. Actually no transfer at all because rsync thinks there are no more differences between the servers. []'s Salatiel On Mon, Mar 12, 2012 at 16:02, Kevin Korb wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Are there any errors?  Rs

Re: --delete not working

2012-03-12 Thread Kevin Korb
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Are there any errors? Rsync will abort the deletions if there are any errors. Run without the -v to get only the errors in the output. On 03/12/12 15:00, Salatiel Filho wrote: > Hi guys , i need some help. I am trying to make a full sync of two > of

Re: Delete file on destination only if source was delete at least X days before.

2011-11-27 Thread Kevin Korb
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rsync has absolutely no knowledge of when a file was deleted. Perhaps you are looking for something like --backup and --backup-dir to temporarily preserve files instead of deleting them (then deleting them with a simple rm -rf later)? Or maybe you sh

Re: delete files

2011-11-22 Thread Brian K. White
On 11/22/2011 6:51 AM, Paul Slootman wrote: On Mon 21 Nov 2011, Brian K. White wrote: On 11/19/2011 9:04 AM, francis.montag...@inria.fr wrote: On Tue, 15 Nov 2011 23:49:18 +0100 "Brian K. White" wrote: nj2:/opt/x # rsync -avvvn --force --delete --include=/tmp --include=floof/ --exclude='*' /

Re: delete files

2011-11-22 Thread Paul Slootman
On Mon 21 Nov 2011, Brian K. White wrote: > On 11/19/2011 9:04 AM, francis.montag...@inria.fr wrote: > > > >On Tue, 15 Nov 2011 23:49:18 +0100 "Brian K. White" wrote: > > > >>nj2:/opt/x # rsync -avvvn --force --delete --include=/tmp > >>--include=floof/ --exclude='*' /tmp/. co4::root/tmp/. > > > >D

Re: delete files

2011-11-21 Thread Brian K. White
On 11/21/2011 3:09 PM, Brian K. White wrote: > pushfile /path/to/thing > pushfile /path/to/thing host pushfile /path/to/thing OR pushfile /path/to/thing host -- bkw -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.

Re: delete files

2011-11-21 Thread Brian K. White
On 11/19/2011 9:04 AM, francis.montag...@inria.fr wrote: On Tue, 15 Nov 2011 23:49:18 +0100 "Brian K. White" wrote: nj2:/opt/x # rsync -avvvn --force --delete --include=/tmp --include=floof/ --exclude='*' /tmp/. co4::root/tmp/. Detail: /tmp being the "root of the transfer", "--include=/tmp"

Re: delete files

2011-11-19 Thread Francis . Montagnac
On Tue, 15 Nov 2011 23:49:18 +0100 "Brian K. White" wrote: > nj2:/opt/x # rsync -avvvn --force --delete --include=/tmp > --include=floof/ --exclude='*' /tmp/. co4::root/tmp/. Detail: /tmp being the "root of the transfer", "--include=/tmp" is wrong because it refers then to /tmp/tmp. I thing yo

RE: delete files

2011-11-16 Thread Voelker, Bernhard
Brian K. White wrote: > ... Looks like it works, but only for files not directories. > > All I did was change: > rsync $OPTS --include=/$F --exclude='*' $P ${h}::root$P > to > rsync $OPTS --include=/$F --exclude='*' ${P}/. ${h}::root${P}/. > > And now if the file doesn't exist locally it is dele

Re: delete files

2011-11-15 Thread Brian K. White
On 11/15/2011 4:15 AM, Voelker, Bernhard wrote: Brian K. White wrote: On 11/14/2011 2:29 AM, Voelker, Bernhard wrote: rsync -avx --delete --include=/file --exclude='*' . host2:deltest/. This didn't work for me, although one difference is my script specifies a path instead of "." Does this on

RE: delete files

2011-11-15 Thread Voelker, Bernhard
Brian K. White wrote: > On 11/14/2011 2:29 AM, Voelker, Bernhard wrote: > > rsync -avx --delete --include=/file --exclude='*' . host2:deltest/. > > This didn't work for me, although one difference is my script specifies > a path instead of "." Does this only work with literally "." in the > pla

Re: delete files

2011-11-14 Thread Brian K. White
On 11/14/2011 2:29 AM, Voelker, Bernhard wrote: rsync -avx --delete --include=/file --exclude='*' . host2:deltest/. This didn't work for me, although one difference is my script specifies a path instead of "." Does this only work with literally "." in the places above? My script parses the

Re: delete files

2011-11-14 Thread Brian K. White
On 11/14/2011 2:29 AM, Voelker, Bernhard wrote: Brian K. White wrote: Is there any way to specify a file to be deleted on the remote side explicitly by name? yes :-) user@host1:~/deltest> ls -a1 . .. a b c file user@host1:~/deltest> ssh host2 ls -a1 deltest . .. a b c file user@host1:~/del

RE: delete files

2011-11-13 Thread Voelker, Bernhard
Brian K. White wrote: > Is there any way to specify a file to be deleted on the remote side > explicitly by name? yes :-) user@host1:~/deltest> ls -a1 . .. a b c file user@host1:~/deltest> ssh host2 ls -a1 deltest . .. a b c file user@host1:~/deltest> rm file user@host1:~/deltest> rsync -avx --

Re: delete files

2011-11-11 Thread Brian K. White
On 11/11/2011 5:15 PM, Carlos Carvalho wrote: Brian K. White (br...@aljex.com) wrote on 11 November 2011 15:59: >Is there any way to specify a file to be deleted on the remote side >explicitly by name? > >I would have thought that deleting the file locally, the rsyncing the >non-existin

Re: delete files

2011-11-11 Thread Carlos Carvalho
Brian K. White (br...@aljex.com) wrote on 11 November 2011 15:59: >Is there any way to specify a file to be deleted on the remote side >explicitly by name? > >I would have thought that deleting the file locally, the rsyncing the >non-existing file with --del would have resulted in the remote

Re: --delete option

2011-08-24 Thread Kevin Korb
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - --update skips files that are newer on the target than the source. If the file does not exist on the source then there is no concept of "newer". - --delete deletes things that are on the target but not the source (and not excluded). It can't be as

Re: --delete option

2011-08-24 Thread Eberhard Moenkeberg
Hi, On Wed, 24 Aug 2011, Kevin Korb wrote: Unfortunately rsync has no concept of "newly created". --updateskip files that are newer on the receiver doesn't prevent deleting for files not existing on source side? On 08/24/11 15:38, Saman Ghannadzadeh wrote: Hi all, I was

Re: --delete option

2011-08-24 Thread Kevin Korb
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Unfortunately rsync has no concept of "newly created". On 08/24/11 15:38, Saman Ghannadzadeh wrote: > Hi all, > > I was wondering if it's possible to make the --delete option to not > delete files that have been newly created on the destination site

Re: --delete-during acts like --delete-before

2010-09-18 Thread Wayne Davison
On Fri, Sep 10, 2010 at 11:29 AM, Craig Bell wrote: > That's interesting! I tried this, --del does indeed behave strictly > "infix" when both paths are local. > No, there's no difference in how the deletions occur, but there is a difference in how the output makes it to the screen between a pull

Re: --delete-during acts like --delete-before

2010-09-14 Thread Jon Price
Hi, Not sure if post below made it to the list, so re-sending. Apologies if you already got this. On Sep 10, 2:29 pm, Craig.B... @standard.com (Craig Bell) wrote: > Mi

RE: --delete-during acts like --delete-before

2010-09-10 Thread Craig Bell
Michal Soltys wrote: > Try for example something analogous to: Thanks Michal, I have a workaround that provides the behavior that I want to see: for dir in 0 1 2 3 ; do rsync -a --del srchost::del-test/${dir} . done rsync -a --del srchost::del-test . > On a related note, if you call

RE: --delete-during acts like --delete-before

2010-09-10 Thread Craig Bell
Carlos Carvalho wrote: > Did you try with --no-i-r? In your somewhat particular case it might do what > you want. Thanks Carlos, I tried --no-i-r with my test data, but it still effectively deletes before. -cheers, CSB -- Please use reply-all for most replies to avoid omitting the mailing li

Re: --delete-during acts like --delete-before

2010-09-09 Thread Michal Soltys
On 10-09-09 20:17, Craig Bell wrote: > Michal Soltys wrote: > > > As stated, I would prefer this, however I do not have enough space to keep > two editions of the files. > I must delete as I go along, however I don't want to delete everything up > front, and risk exposure. > My workaround was t

RE: --delete-during acts like --delete-before

2010-09-09 Thread Carlos Carvalho
Craig Bell (craig.b...@standard.com) wrote on 9 September 2010 18:26: >Matthias Schniedermeyer wrote: > >> My observation of current rsync in "Incremental Recursion"-Mode >>(default), with default "--delete", is that the files it deletes are >> about 1000 files further down the list than the

RE: --delete-during acts like --delete-before

2010-09-09 Thread Craig Bell
Matthias Schniedermeyer wrote: > My observation of current rsync in "Incremental Recursion"-Mode >(default), with default "--delete", is that the files it deletes are > about 1000 files further down the list than the file it currently > transfers. > So question is: Are there more than 1000 file

RE: --delete-during acts like --delete-before

2010-09-09 Thread Craig Bell
Michal Soltys wrote: > Hmmm, rsync wouldn't do that. As mentioned above, files being part of > the transfer (whenever uptodate ones, or the ones to be updated) will > not be preemptivly removed. Even the old files are not deleted first - > they are transfered to a temporary file and moved over

RE: --delete-during acts like --delete-before

2010-09-09 Thread Craig Bell
Michal Soltys wrote: > If you used --delete-during - rsync would combine 1st and 2nd pass of > --delete-before into single pass, where deletion and transfer would be > done on directory per directory basis, recursively. Thanks for writing, Michal. In my example, I used --delete-during, however

Re: --delete-during acts like --delete-before

2010-09-09 Thread Matthias Schniedermeyer
On 08.09.2010 23:07, Craig Bell wrote: > > Hello, I use rsync v3.0.7 with "--delete-during", but it appears to > act more like "--delete-before". I've checked the docs and list > archives, but I am still discovering some of the subtleties of > rsync, and I can't see where I'm going wro

Re: --delete-during acts like --delete-before

2010-09-09 Thread Michal Soltys
On 09.09.2010 02:05, Michal Soltys wrote: On 10-09-09 01:07, Craig Bell wrote: 1) 1st delete pass, honoring global (on B or sent from A, if rsync was executed on A) and per directory (on B) rules of what to protect/delete (see --filter's options R & P) 2) 2nd transfer pass To be a bit more sp

Re: --delete-during acts like --delete-before

2010-09-08 Thread Michal Soltys
On 10-09-09 01:07, Craig Bell wrote: Hello, I use rsync v3.0.7 with "--delete-during", but it appears to act more like "--delete-before". I've checked the docs and list archives, but I am still discovering some of the subtleties of rsync, and I can't see where I'm going wrong. There's an

Re: --delete and --files-from

2010-05-29 Thread Wayne Davison
On Mon, May 24, 2010 at 8:50 AM, Leon Castellanos wrote: > Does anyone know if –delete can work with –files-from? > That depends on what you're expecting to be deleted. Rsync only deletes files from within directories that it sends, so any directories mentioned in the --files-from list will hav

Re: --delete question.

2010-03-24 Thread Matt McCutchen
On Wed, 2010-03-24 at 12:10 +0530, Satish Shukla wrote: > Please advise on rsync usage. --delete doesn’t work without > recursion(--recursion). The recursion is causing huge overheads for > me. My directory trees are huge. Any suggestions through which I can > cut overheads. It used to work well

Re: --delete flag not working on cygwin rsync

2009-08-20 Thread Matt McCutchen
On Fri, 2009-08-14 at 07:24 -0700, Wayne Davison wrote: > On Tue, Aug 04, 2009 at 03:10:20PM -0400, Sharad K wrote: > > Everything works fine except the --delete flag. > > Does rsync output a warning about an I/O error, saying it is disabling > deletes? You can use --force if you're sure you want

Re: --delete flag not working on cygwin rsync

2009-08-14 Thread Wayne Davison
On Tue, Aug 04, 2009 at 03:10:20PM -0400, Sharad K wrote: > Everything works fine except the --delete flag. Does rsync output a warning about an I/O error, saying it is disabling deletes? You can use --force if you're sure you want rsync to override that. You might also try using --dry-run to se

Re: --delete-before doesn't seem to actually be deleting before transfer

2009-07-21 Thread Tim Edwards
Matt McCutchen schrieb: Thanks for the help but I've still had no luck with this. The command now looks like: backupstoremove.py | rsync -av --progress --no-p --no-g --delete-before --stats --include-from=- --include=/media/300GIGHD/backups/dar/restore --exclude="*.dar" /media/300GIGHD/backup

Re: --delete-before doesn't seem to actually be deleting before transfer

2009-07-20 Thread Matt McCutchen
On Mon, 2009-07-20 at 23:24 +0200, Tim Edwards wrote: > Matt McCutchen schrieb: > > > > No, rsync will only do that if if you have it > > "synchronize" /USBstick/backups/dir , i.e., specify a source directory > > that maps to it. Just copying several dirs _into_ /USBstick/backups/dir > > does not

Re: --delete-before doesn't seem to actually be deleting before transfer

2009-07-20 Thread Tim Edwards
Matt McCutchen schrieb: No, rsync will only do that if if you have it "synchronize" /USBstick/backups/dir , i.e., specify a source directory that maps to it. Just copying several dirs _into_ /USBstick/backups/dir does not do the trick. See the description of --delete in the man page. Someth

Re: --delete-before doesn't seem to actually be deleting before transfer

2009-07-14 Thread Matt McCutchen
On Tue, 2009-07-14 at 13:01 +0200, Tim Edwards wrote: > I have a script transferring some backup files onto a USB stick, which > has limited space. I use rsync 3.0.5 with the following command: > rsync -av --delete-before /local/backups/dir/backup1_todaysdate > /local/backups/dir/backup2_todaysdat

Re: --delete not working (minimal example)

2009-07-14 Thread Nobuko Three
My God How did I miss that? Also, it turned out my original problem was that I passed -delete instead of --delete. I played too much with mencoder recently which uses single - for both short and long options. Paul Slootman-5 wrote: > > On Tue 14 Jul 2009, Nobuko Three wrote: > >> --delete op

Re: --delete not working (minimal example)

2009-07-14 Thread Paul Slootman
On Tue 14 Jul 2009, Nobuko Three wrote: > --delete option is not working for me. The following is a minimal example. > > $ mkdir box1 box2 > $ touch box1/letter box2/extra > $ rsync -a -vv box1/ box2/ > > $ rsync -a -vvv box1/ box2/ > $ rsync -a - box1/ box2/ How do you ex

Re: --delete-before doesn't seem to actually be deleting before transfer

2009-07-14 Thread David Brown
Apologies, I think I'm wrong about my previous reply, just checked and --delete is "implied"... You need to use --delete instead of just the --delete-before. You do not actually need the "before" bit as this is the default for -- delete. -david On 14 Jul 2009, at 12:01, Tim Edwards wrote:

Re: --delete-before doesn't seem to actually be deleting before transfer

2009-07-14 Thread Matthias Schniedermeyer
On 14.07.2009 13:01, Tim Edwards wrote: > I have a script transferring some backup files onto a USB stick, which > has limited space. I use rsync 3.0.5 with the following command: > rsync -av --delete-before /local/backups/dir/backup1_todaysdate > /local/backups/dir/backup2_todaysdate > /local/back

Re: --delete-before doesn't seem to actually be deleting before transfer

2009-07-14 Thread David Brown
You need to use --delete instead of just the --delete-before. You do not actually need the "before" bit as this is the default for --delete. -david On 14 Jul 2009, at 12:01, Tim Edwards wrote: I have a script transferring some backup files onto a USB stick, which has limited space. I use rsy

Re: Delete files specified in "--from-files"-file that don't exist on the sender side

2009-03-08 Thread Matt McCutchen
On Fri, 2009-03-06 at 22:56 -0800, Wayne Davison wrote: > If someone is doing inotify-based --files-from transfers and a filename > is now missing, maybe they really want --delete-missing-args to ensure > that the receiver doesn't have a version of the now-missing file. There's no need for that: t

Re: Delete files specified in "--from-files"-file that don't exist on the sender side

2009-03-06 Thread Wayne Davison
On Fri, Mar 06, 2009 at 04:44:56PM -0500, Matt McCutchen wrote: > Two issues you may wish to correct [...] Thanks for pointing those out! I've made sure that the mode does not get tweaked by --chmod if it is 0, and changed the --list-only output to start with "*missing", as you suggested. > Whil

Re: Delete files specified in "--from-files"-file that don't exist on the sender side

2009-03-06 Thread Matt McCutchen
On Sat, 2009-02-28 at 09:36 -0800, Wayne Davison wrote: > I added an option to the latest development version that supports this: > --delete-missing-args. Nice work! I feared the implementation would be much messier. Two issues you may wish to correct (or I might do it and post the patch): 1. T

Re: Delete files specified in "--from-files"-file that don't exist on the sender side

2009-02-28 Thread Wayne Davison
On Fri, Feb 13, 2009 at 12:31:54AM +0100, intripoon wrote: > Now there are files I want to have deleted on PC B. They don't exist > on PC A. I hoped I could just add them to the list of files given to > --from-files, but the sender just tells me "failed: No such file or > directory (2)" and goes on

Re: Delete only run

2009-01-09 Thread Fabian Cenedese
>> Is there a way to take advantage of incremental, even if it means >> running rsync twice? > >You can use --ignore-existing --ignore-non-existing --del to perform an >incremental deletion run: > >--existing, --ignore-non-existing > This tells rsync to skip creating files (including directories)

Re: Delete only run

2009-01-08 Thread Wayne Davison
On Thu, Jan 08, 2009 at 11:29:21AM +0100, Fabian Cenedese wrote: > --delete-before receiver deletes before transfer (default) The man page was lagging behind. I've checked in a fix. Thanks! > Is there a way to take advantage of incremental, even if it means > running rsync twice? You c

Re: Delete only run

2009-01-08 Thread Fabian Cenedese
Sorry Matt for mailing you personally. At 03:58 08.01.2009 -0500, you wrote: >On Thu, 2009-01-08 at 09:42 +0100, Fabian Cenedese wrote: >> I have a backup on a NAS that is quite full. So when I try to backup >> changed stuff it may run out of space, but only because rsync may >> try to write a new

Re: Delete only run

2009-01-08 Thread Matt McCutchen
On Thu, 2009-01-08 at 09:42 +0100, Fabian Cenedese wrote: > I have a backup on a NAS that is quite full. So when I try to backup > changed stuff it may run out of space, but only because rsync may > try to write a new file before deleting the old one. That not only means > changed files in the same

Re: Delete source folder?

2008-11-26 Thread Matt McCutchen
On Wed, 2008-11-26 at 18:33 +0100, Jeroen van der Vegt wrote: > We're using rsync to move files from a server to a client (an embedded > device, connected over GPRS) using a cron script on the client. To > accomplish this, we use the --delete-source-files option. As I found in the > archives, this

Re: --delete

2008-10-13 Thread Matt McCutchen
On Mon, 2008-10-13 at 23:20 -0400, Franck Y wrote: > I got the source and rebuild it since i needed the --backup-dir-dels > option. > > I sucesfully compiled it within my remote and my host. > > I have a little script that is working so i added the > --backup-dir-dels > > rsync --owner --group

Re: --delete

2008-10-13 Thread Franck Y
On Sun, Oct 5, 2008 at 2:19 PM, Matt McCutchen <[EMAIL PROTECTED]>wrote: > On Sun, 2008-10-05 at 01:03 -0400, Franck Y wrote: > > Quick Question i will have to download the source [to use a backup > > dir] ? > > > > It is already running on my system ? I have installed though a rpm ? > > Your RPM-

Re: --delete

2008-10-05 Thread Matt McCutchen
On Sun, 2008-10-05 at 01:03 -0400, Franck Y wrote: > Quick Question i will have to download the source [to use a backup > dir] ? > > It is already running on my system ? I have installed though a rpm ? Your RPM-installed rsync should support the --backup-dir option out of the box. You only need

Re: --delete

2008-10-02 Thread Matt McCutchen
On Thu, 2008-10-02 at 21:28 -0400, Franck Yelles wrote: > On 2-Oct-08, at 21:01, Matt McCutchen <[EMAIL PROTECTED]> wrote: > > On Thu, 2008-10-02 at 20:59 -0400, Franck Y wrote: > >> Is there anyway to move the deleted files/folder to another place ? > >> I have googled a little bit but nothing com

Re: --delete

2008-10-02 Thread Franck Yelles
On 2-Oct-08, at 21:01, Matt McCutchen <[EMAIL PROTECTED]> wrote: On Thu, 2008-10-02 at 20:59 -0400, Franck Y wrote: Is there anyway to move the deleted files/folder to another place ? I have googled a little bit but nothing comes out. It's the --backup-dir option. If you want to treat del

Re: --delete

2008-10-02 Thread Matt McCutchen
On Thu, 2008-10-02 at 20:59 -0400, Franck Y wrote: > Is there anyway to move the deleted files/folder to another place ? > I have googled a little bit but nothing comes out. It's the --backup-dir option. If you want to treat deleted files differently from overwritten ones, use this patch: http:

Re: --delete and --files-from

2008-06-26 Thread Matt McCutchen
On Thu, 2008-06-26 at 07:41 -0700, Wayne Davison wrote: > On Wed, Jun 25, 2008 at 04:26:08PM -0400, Aaron Davies wrote: > > My guess is that the subdirectories of the target directory not > > mentioned in the --files-from file are not considered part of the > > sync and are thus not considered for

Re: --delete and --files-from

2008-06-26 Thread Wayne Davison
On Wed, Jun 25, 2008 at 04:26:08PM -0400, Aaron Davies wrote: > My guess is that the subdirectories of the target directory not > mentioned in the --files-from file are not considered part of the > sync and are thus not considered for deletion. No, not if you've explicitly specified -r (since -a d

Re: --delete and --files-from

2008-06-25 Thread Matt McCutchen
On Wed, 2008-06-25 at 16:26 -0400, Aaron Davies wrote: > I want to maintain mirror of a sliding window of the last N > subdirectories of a particular directory. My first attempt was to use > ls -t|head to generate a list of dirs to pass to --files-from (with -- > recursive). It's working nicel

Re: delete-delay vs. delete-after in 3.0.2 (and possible bug)

2008-06-18 Thread Michal Soltys
Wayne Davison wrote: Diffs are always welcomed. Please feel free. ..wayne.. Allright, tiny update to the rsync.yo file. I haven't included information about backup/suffix case you mentioned, as I'm not sure about the details yet. --- rsync.yo.org2008-05-17 18:45:28.0 +02

Re: delete-delay vs. delete-after in 3.0.2 (and possible bug)

2008-06-17 Thread Wayne Davison
On Sun, Jun 15, 2008 at 09:36:30AM +0200, Michal Soltys wrote: > would it be allright to submit a small manpage diff, to add some > details about difference between delete-delay and delete-after ? Diffs are always welcomed. Please feel free. ..wayne.. -- Please use reply-all for most replies t

Re: delete-delay vs. delete-after in 3.0.2 (and possible bug)

2008-06-15 Thread Michal Soltys
Wayne Davison wrote: On Tue, Jun 10, 2008 at 09:58:34PM +0200, Michal Soltys wrote: have per-dir filter files being updated, its works the same as --delete-after (if we disregard certain backup-file cases where the suffix is not excluded), just more optimally. You mean - the difference will b

Re: delete-delay vs. delete-after in 3.0.2 (and possible bug)

2008-06-10 Thread Wayne Davison
On Tue, Jun 10, 2008 at 09:58:34PM +0200, Michal Soltys wrote: > Still, in that case - what's the benefit of using --delete-delay option ? It is useful for things such as --delay-updates --delete-delay (to have all updates happen more rapidly at the end), and the option avoids an extra dir-scan de

Re: delete-delay vs. delete-after in 3.0.2 (and possible bug)

2008-06-10 Thread Michal Soltys
Wayne Davison wrote: per-dir rules set right for both the on-going copying, and a late delete scan). I don't think this is likely to change any time soon, but it would be nice to have a way of doing something like early per-dir filter copying or something. ..wayne.. Oki, thanks for clarifica

Re: delete-delay vs. delete-after in 3.0.2 (and possible bug)

2008-06-10 Thread Wayne Davison
On Tue, Jun 10, 2008 at 04:41:42PM +0200, Michal Soltys wrote: > rsync -aHx --delete-delay --filter="dir-merge, .rf" /src/ /dst/ > ...testfile will be removed, unless .rf (with above rules) already exists > on the receiving side. Yeah, that is how it currently works. The --delete-delay option de

Re: delete without copy

2008-03-03 Thread Matt McCutchen
On Mon, 2008-03-03 at 11:14 +0100, david reinares wrote: > Is there any way to run rsync to create a file list and just delete > files not present at source? Yes, there's a neat little trick that does this: pass --ignore-non-existing --ignore-existing to stop rsync from creating new files and from

Re: Delete files using no recursion

2007-12-06 Thread Matt McCutchen
On Thu, 2007-12-06 at 19:23 -0200, Rivanor P. Soares wrote: > I'm running rsync (2.6.2) That's pretty old. You might want to upgrade to the latest stable version, 2.6.9. > I want to sync all .fle files from dir1 to the dir2 and also remove > files from the destination which were removed from the

  1   2   >