Re: --delete option
-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 but which do not yet exist on the source side. However it should still delete files that did exist on the source side but were subsequently deleted. Many Thanks, Saman - -- ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ Kevin Korb Phone:(407) 252-6853 Systems Administrator Internet: FutureQuest, Inc. ke...@futurequest.net (work) Orlando, Floridak...@sanitarium.net (personal) Web page: http://www.sanitarium.net/ PGP public key available on web site. ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.17 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5VU8QACgkQVKC1jlbQAQcaRACg1lo4WTxHeG007KPQD7+nfqoR dFYAnjgIPo6B84cM8JzVTRtzLF7hqAjL =bvY+ -END PGP SIGNATURE- -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: --delete option
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 wondering if it's possible to make the --delete option to not delete files that have been newly created on the destination site but which do not yet exist on the source side. However it should still delete files that did exist on the source side but were subsequently deleted. Many Thanks, Saman - -- ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ Kevin Korb Phone:(407) 252-6853 Systems Administrator Internet: FutureQuest, Inc. ke...@futurequest.net (work) Orlando, Floridak...@sanitarium.net (personal) Web page: http://www.sanitarium.net/ PGP public key available on web site. ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.17 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5VU8QACgkQVKC1jlbQAQcaRACg1lo4WTxHeG007KPQD7+nfqoR dFYAnjgIPo6B84cM8JzVTRtzLF7hqAjL =bvY+ -END PGP SIGNATURE- -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html Viele Gruesse Eberhard Moenkeberg (emoe...@gwdg.de, e...@kki.org) -- Eberhard Moenkeberg Arbeitsgruppe IT-Infrastruktur E-Mail: emoe...@gwdg.de Tel.: +49 (0)551 201-1551 - Gesellschaft fuer wissenschaftliche Datenverarbeitung mbH Goettingen (GWDG) Am Fassberg 11, 37077 Goettingen URL:http://www.gwdg.de E-Mail: g...@gwdg.de Tel.: +49 (0)551 201-1510Fax:+49 (0)551 201-2150 Geschaeftsfuehrer: Prof. Dr. Oswald Haan und Dr. Paul Suren Aufsichtsratsvorsitzender: Prof. Dr. Christian Griesinger Sitz der Gesellschaft: Goettingen Registergericht: Goettingen Handelsregister-Nr. B 598 - -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: --delete option
-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 associated with --newer because there is no source file to compare it to. On 08/24/11 17:52, Eberhard Moenkeberg wrote: 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 wondering if it's possible to make the --delete option to not delete files that have been newly created on the destination site but which do not yet exist on the source side. However it should still delete files that did exist on the source side but were subsequently deleted. Many Thanks, Saman - -- ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ Kevin KorbPhone:(407) 252-6853 Systems AdministratorInternet: FutureQuest, Inc.ke...@futurequest.net (work) Orlando, Floridak...@sanitarium.net (personal) Web page:http://www.sanitarium.net/ PGP public key available on web site. ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.17 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5VU8QACgkQVKC1jlbQAQcaRACg1lo4WTxHeG007KPQD7+nfqoR dFYAnjgIPo6B84cM8JzVTRtzLF7hqAjL =bvY+ -END PGP SIGNATURE- -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html Viele Gruesse Eberhard Moenkeberg (emoe...@gwdg.de, e...@kki.org) - -- ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ Kevin Korb Phone:(407) 252-6853 Systems Administrator Internet: FutureQuest, Inc. ke...@futurequest.net (work) Orlando, Floridak...@sanitarium.net (personal) Web page: http://www.sanitarium.net/ PGP public key available on web site. ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.17 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5VeQYACgkQVKC1jlbQAQcBrQCg/eI56yDCBtCUOctQ7nJPJATe 3T0AnAiCAgXgAAdZd8bTqqfDNPcRURf5 =r4j5 -END PGP SIGNATURE- -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: delete option?
On 1/13/07, Tino Schöllhorn [EMAIL PROTECTED] wrote: rsync -v --delete --times /var/subversion/ myhost.de:backup/subversion/ The backup works fine - but file which are deleted from the source *aren't* deleted from the destination as I expected. You need the -r option (--recursive) to make rsync go inside the source and destination directories in the first place so that it can delete files from the destination. You say the backup works fine: did rsync copy files from the source directory to the destination directory, even without -r? If so, that would be a big bug. Matt -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: delete option?
Hi, thanks. Now it works. Of course you are right: Synching worked without -r als long as I specified the files explicitly. It would really help if the documentation would be updated and point out that --delete works only with the -r option. As I can see there are a lot of people out there who have problems with that option. Again thanks. Tino Matt McCutchen wrote: On 1/13/07, Tino Schöllhorn [EMAIL PROTECTED] wrote: rsync -v --delete --times /var/subversion/ myhost.de:backup/subversion/ The backup works fine - but file which are deleted from the source *aren't* deleted from the destination as I expected. You need the -r option (--recursive) to make rsync go inside the source and destination directories in the first place so that it can delete files from the destination. You say the backup works fine: did rsync copy files from the source directory to the destination directory, even without -r? If so, that would be a big bug. Matt -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: delete option?
On 1/13/07, Tino Schöllhorn [EMAIL PROTECTED] wrote: It would really help if the documentation would be updated and point out that --delete works only with the -r option. As I can see there are a lot of people out there who have problems with that option. Version 2.6.7 and later of the man page does mention this. Matt -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: delete option
On Sat, Nov 25, 2006 at 02:14:39PM -0300, Manuel Kissoyan wrote: if in the sender side server i delete a directory with files and directories into it after run rsync is not removing that directory/files on the receiver side. I can only guess here since you don't supply any details of your run, but this is usually caused by someone using a wildcard (for example, rsync -av --del /src/* host:/dest), which does not send the src directory, and therefore no deletions can occur inside it. Just drop the wildcard (leaving the trailing slash) if that is the case. btw: all the delete options is only to delete the receiver side? i mean using them will not delete the sender side? That's right. The --remove-* options affect the sending side, and the --delete-* options the receiving side. ..wayne.. -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: delete option
Sorry...i forgot the detailshere is the info... im running: rsync -vrplogDtzH --stats --delete-during --partial --timeout=500 --exclude-from=/root/rsyncexcludedfiles --files-from=/root/rsyncincludedfiles.. and the includedfiles list have some wildecards but the files that has not been deleted wasnt in the wildcard path... /etc/*named* /home i mean, i have a directory with files into the /home so there isnt a wildecard and rsync havent deleted it. Thanx! - Original Message - On Sat, Nov 25, 2006 at 02:14:39PM -0300, Manuel Kissoyan wrote: if in the sender side server i delete a directory with files and directories into it after run rsync is not removing that directory/files on the receiver side. I can only guess here since you don't supply any details of your run, but this is usually caused by someone using a wildcard (for example, rsync -av --del /src/* host:/dest), which does not send the src directory, and therefore no deletions can occur inside it. Just drop the wildcard (leaving the trailing slash) if that is the case. btw: all the delete options is only to delete the receiver side? i mean using them will not delete the sender side? That's right. The --remove-* options affect the sending side, and the --delete-* options the receiving side. ..wayne.. -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: delete option
Manuel Kissoyan wrote: rsync -vrplogDtzH --stats --delete-during --partial --timeout=500 --exclude-from=/root/rsyncexcludedfiles --files-from=/root/rsyncincludedfiles.. and the includedfiles list have some wildecards but the files that has not been deleted wasnt in the wildcard path... /etc/*named* /home i mean, i have a directory with files into the /home so there isnt a wildecard and rsync havent deleted it. Does your exclude file list the files you deleted from the sender? If so, the receiver won't delete its copies because exclude rules also prevent deletion; you might want to use --delete-excluded. If not, I recommend running rsync in double-verbose mode (-vv) to get more information about why the receiver isn't deleting the files. Matt -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: --delete option does not always work
Hi, Wayne Davison [EMAIL PROTECTED] wrote: OK, I had a free moment to work up a fix, and here it is. It was pretty simple. I'm sorry to wake this up again, but it seems not to be so simple to fix at all :) I've stumbled over this while noticing that the rsnapshot backup of my root-filesystem simply never gets anything removed at all. So I made some tests: [EMAIL PROTECTED]:~# rsync --version | head -1 rsync version 2.6.8 protocol version 29 [EMAIL PROTECTED]:~# rsync -HSaxvn --delete --relative / /mnt/rsnapshot/daily.0/darkside/root | grep -c ^deleting 0 [EMAIL PROTECTED]:~# rsync -HSaxvn --delete / /mnt/rsnapshot/daily.0/darkside/root | grep -c ^deleting 264 [EMAIL PROTECTED]:~# cd / [EMAIL PROTECTED]:/# rsync -HSaxvn --delete --relative . /mnt/rsnapshot/daily.0/darkside/root | grep -c ^deleting 264 [EMAIL PROTECTED]:~# rsync -HSaxvn --delete --relative /. /mnt/rsnapshot/daily.0/darkside/root | grep -c ^deleting 0 As you can see, the only workaround that seems to work is cd / and using . then. However, this is not always possible, i.e. when rsyncing some.host:/ Of course, it would be simple to just avoid the --relative in this special case. But this is also not always possible, i.e. when using rsnapshot (:)) or - more serious - when rsyncing multiple sources at once like rsync -HSaxvn --delete --relative / /home /target Perhaps, a possible solution could be to temporarily disable --relative in the rsync code directly as long as it works on a / Though, I'm not absolutely sure about the side-effects of this (i.e. with include/exclude lists). I'm using Debians rsync 2.6.8-2 which should have Waynes patch included. At least Lennys test-case in the beginning of this thread is not reproducible with this version. regards Mario -- As a rule, the more bizarre a thing is, the less mysterious it proves to be. -- Sherlock Holmes by Arthur Conan Doyle -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: --delete option does not always work
On Sat, Sep 09, 2006 at 12:22:57PM -0700, Wayne Davison wrote: This is a different bug that was recently fixed: using --relative with a root (/) filesystem and --delete was also failing to delete. The latest CVS source and recent nightly tar files have this fixed. Here's the bug (which has an attached patch): https://bugzilla.samba.org/show_bug.cgi?id=3929 Oh, thank you very much. Mario -- Evidently men are more intelligent than women. Every woman on earth believes that men should be able to read minds. Every man knows this is impossible. Ergo, we are more intelligent. signature.asc Description: Digital signature -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: --delete option does not always work
On Wed, Apr 27, 2005 at 12:57:51PM -0400, Lenny wrote: rsync -a --delete --numeric-ids --relative --delete-excluded -v src/ dest/ The problem is caused by the source dir being src/ instead of src when --relative is specified (this causes a problem internally because the starting directory is transferred as src/., so the receiver's heuristic to separate implied dirs in the file list from real dirs is not properly marking those subdirs as a part of the transferred hierarchy). You can work around the problem for now by dropping the trailing slash (while I work up a fix). Thanks for the report, ..wayne.. -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: --delete option does not always work
OK, I had a free moment to work up a fix, and here it is. It was pretty simple. ..wayne.. --- flist.c 30 Mar 2005 17:31:35 - 1.291 +++ flist.c 27 Apr 2005 19:14:17 - @@ -655,6 +655,9 @@ static struct file_struct *receive_file_ if (flags XMIT_TOP_DIR) { in_del_hier = 1; del_hier_name_len = file-dir.depth == 0 ? 0 : l1 + l2; + if (relative_paths del_hier_name_len 2 +basename_len == 1+1 *basename == '.') + del_hier_name_len -= 2; file-flags |= FLAG_TOP_DIR | FLAG_DEL_HERE; } else if (in_del_hier) { if (!relative_paths || !del_hier_name_len -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: --delete option
On Fri 29 Oct 2004, [EMAIL PROTECTED] wrote: I'm a bit paranoid, but had to ask-- How safe is it to use the --delete option? ie, when using it locally (or via a mounted network volume), will I *ever* have to worry about my actual source files being delete mistakenly (instead of dest. files)? Source files will never be deleted. Of course, if you screw up the parameters to rsync sufficiently, you might end up passing the source dir as the destination, but there's nothing any software can do about that sort of error... When in doubt, use the --dry-run option to show what rsync is going to do without actually doing anything. Paul Slootman -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: --delete option
thanks, that's what I wanted to hear (: On Sat, 30 Oct 2004 12:22:16 +0200, Paul Slootman [EMAIL PROTECTED] wrote: On Fri 29 Oct 2004, [EMAIL PROTECTED] wrote: I'm a bit paranoid, but had to ask-- How safe is it to use the --delete option? ie, when using it locally (or via a mounted network volume), will I *ever* have to worry about my actual source files being delete mistakenly (instead of dest. files)? Source files will never be deleted. Of course, if you screw up the parameters to rsync sufficiently, you might end up passing the source dir as the destination, but there's nothing any software can do about that sort of error... When in doubt, use the --dry-run option to show what rsync is going to do without actually doing anything. Paul Slootman -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html