Re: backup option
Thanks all responses. That works fine. Kind Regards, hce On Thu, Aug 12, 2010 at 10:23 AM, Alex Ferrara a...@receptiveit.com.au wrote: Would that not be done by omitting the --delete option? aF On 12/08/2010, at 9:52 AM, hce wrote: Hi, I am using rsync to backup files. Is it possible to specify an option not to delete files from backup directory if the files are deleted from source? In that way, I can always keep something I may or may not need in the backup disk, but remove it from a work computer. Thank you. Kind Regards. hce -- 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 -- 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: backup option
hce wrote: I am using rsync to backup files. Is it possible to specify an option not to delete files from backup directory if the files are deleted from source? In that way, I can always keep something I may or may not need in the backup disk, but remove it from a work computer. Perhaps you want the --backup --backup-dir=DIR options? -b, --backupmake backups (see --suffix --backup-dir) --backup-dir=DIRmake backups into hierarchy based in DIR Bob -- 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: backup option
Would that not be done by omitting the --delete option? aF On 12/08/2010, at 9:52 AM, hce wrote: Hi, I am using rsync to backup files. Is it possible to specify an option not to delete files from backup directory if the files are deleted from source? In that way, I can always keep something I may or may not need in the backup disk, but remove it from a work computer. Thank you. Kind Regards. hce -- 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 -- 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: backup option
I am using rsync to backup files. Is it possible to specify an option not to delete files from backup directory if the files are deleted from source? In that way, I can always keep something I may or may not need in the backup disk, but remove it from a work computer. As Alex mentioned the omitting the --delete option is the way to go. However, you should keep in mind that (depending upon the rsync options you provide) if you update a file (within the source directory) the then older version of this file in the destination directory will be overwritten. If you want to preserve old revisions of files, there are various rsync options which will allow various actions to be take place to the older versions which already exist in the destination directory. Below is an example of what I am talking about with regards older versions being overwritten in the destination directory when using the --archive rsync option. $ mkdir 1 2 $ ls 1 2 $ touch 1/hello $ rsync -a 1 2 $ echo hello there 1/hello $ rsync -a 1 2 $ cd 2/1 $ ls -a . ..hello $ cat hello hello there You will notice that there is no copy of the original (blank) file only the more recent version which contains the hello there text. If you check the rsync manual page and perform some www searches, you will find many options and approaches relating to what happens to updated files/directories when you run rsync. -- This email is protected by LBackup http://www.lbackup.org -- 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
Question about the --backup option;
The --backup option in GNU mv, and GNU cp extend the behavior of the -b option in a significant way, I believe. --backup allows specification of versioned backups, especially numbered backups, e.g. The old version of file, foo, becomes foo.~N~, where N is a decimal number. There is no mention of such a feature, that I can find, in info rsync, or man rsync. Is this feature available in rsync? If so, is it available under another name? Actually, the feature may be available under -b, in mv and cp. The man page seems to indicate otherwise, so I've never tested it. I've just used --backup=t, and loved it. Now how do I get similar behavior from rsync? Thanks for your help. -- Paul E Condon pecon...@mesanetworks.net -- 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: Question about the --backup option;
On Mon, 2009-03-16 at 09:55 -0600, Paul E Condon wrote: The --backup option in GNU mv, and GNU cp extend the behavior of the -b option in a significant way, I believe. --backup allows specification of versioned backups, especially numbered backups, e.g. The old version of file, foo, becomes foo.~N~, where N is a decimal number. There is no mention of such a feature, that I can find, in info rsync, or man rsync. Is this feature available in rsync? If so, is it available under another name? Actually, the feature may be available under -b, in mv and cp. The man page seems to indicate otherwise, so I've never tested it. I've just used --backup=t, and loved it. Now how do I get similar behavior from rsync? Rsync does not support numbered backups, but you could specify a different backup suffix on each rsync run via --suffix. -- Matt -- 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: [feature request] Modify --backup option to make backups on source side, too
On Mon, 2007-10-15 at 22:17 -0400, Matt McCutchen wrote: On 10/15/07, Aaron Digulla [EMAIL PROTECTED] wrote: This is for a production system which goes online Q1 2008. Should I use the latest stable version of rsync (2.6.9) or will there be a release of 3.0 until then? Rsync 3.0.0 is in pre-releases now. Chances are very good that the final release will be comfortably before Q1 2008. Alas, I need to revise this prediction. There are a number of outstanding bugs in the latest development version of rsync, and the discovery of new bugs shows no sign of abating. If your system is going online early in Q1 2008, you might do well to build it around rsync 2.6.9 just to be safe. 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
[feature request] Modify --backup option to make backups on source side, too
Hello, Can you please modify the backup options to work together with --remove-source-files so I'm able to create a reliable move between hosts script? If --backup is specified, the files to be deleted should be renamed on the source side. If --backup-dir is specified, they should be moved there, etc. If this already works, please update the documentation accordingly :-) Thanks a lot, -- Aaron Optimizer Digulla a.k.a. Philmann Dark It's not the universe that's limited, it's our imagination. Follow me and I'll show you something beyond the limits. http://www.pdark.de/ -- 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: [feature request] Modify --backup option to make backups on source side, too
On 10/15/07, Aaron Digulla [EMAIL PROTECTED] wrote: Can you please modify the backup options to work together with --remove-source-files so I'm able to create a reliable move between hosts script? The patch patches/source-backup.diff in the source tree adds an option --source-backup to do this. You can compile your own copy of rsync containing the patch and then use that option. 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: [feature request] Modify --backup option to make backups on source side, too
On 10/15/07, Aaron Digulla [EMAIL PROTECTED] wrote: Thanks for the input. If this wasn't for a production system, I'd do that :-) Why don't you apply the patch the release version? Because the patch is a quick hack to serve a niche need, so the benefit of saving people who need source backups a few steps does not outweigh the cost of having it clutter up (and conceivably destabilize) the main version of rsync for everyone else. I think the model of a main version with the most important features plus distributed patches for various extra features is an excellent way to deliver a clean, stable rsync to the typical user but still have implementations of the extra features available when needed. In fact, beginning in September 2005, I used a copy of rsync including a patch for ACL support for nearly all copies on my computer. The patch was a complete hack and I really cared about ACLs, so I helped Wayne improve the patch to the point where it was just as clean and stable as the main code; then, in March 2007, Wayne elected to roll the patch into the main version. In the same way, I encourage you to test and begin using the source-backup patch now if it suits your needs; if you want the patch added to the main version, you can help make that more likely by improving it. 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: [feature request] Modify --backup option to make backups on source side, too
Matt McCutchen schrieb: In the same way, I encourage you to test and begin using the source-backup patch now if it suits your needs; if you want the patch added to the main version, you can help make that more likely by improving it. Thanks. I'll try to convince my bosses to see this as payment for using rsync :-) I just hope I can find a simple way to build rsync on Windows ... I guess I'll try with Cygwin since I already have that installed and I could build GhostPCL with it. Or do you recommend something else? This is for a production system which goes online Q1 2008. Should I use the latest stable version of rsync (2.6.9) or will there be a release of 3.0 until then? PS: Thanks for the new incremental-recursion algorithm. That one has bugged me for a long time! Syncing 150GB of build directories sure spent a lng time in the scanning stage :-) Best regards, -- Aaron Optimizer Digulla a.k.a. Philmann Dark It's not the universe that's limited, it's our imagination. Follow me and I'll show you something beyond the limits. http://www.pdark.de/ -- 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: [feature request] Modify --backup option to make backups on source side, too
On 10/15/07, Aaron Digulla [EMAIL PROTECTED] wrote: Thanks. I'll try to convince my bosses to see this as payment for using rsync :-) I just hope I can find a simple way to build rsync on Windows ... I guess I'll try with Cygwin since I already have that installed and I could build GhostPCL with it. Or do you recommend something else? Rsync on Cygwin is very well supported; unfortunately, remote copies sometimes hang due to deficiencies in Cygwin. I recommend that you try Cygwin first and then, if the hang becomes a problem, Interix. This is for a production system which goes online Q1 2008. Should I use the latest stable version of rsync (2.6.9) or will there be a release of 3.0 until then? Rsync 3.0.0 is in pre-releases now. Chances are very good that the final release will be comfortably before Q1 2008. 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: backup option
On Wed, Apr 06, 2005 at 05:42:19PM -0400, Chimento, Douglas wrote: I have question about the behavior of --backup-dir with --delete-after option. You've discovered a bug in generator.c. It is fixed by this patch: --- generator.c 5 Apr 2005 20:08:51 - 1.198 +++ generator.c 7 Apr 2005 08:07:10 - @@ -1132,6 +1132,7 @@ void generate_files(int f_out, struct fi int save_only_existing = only_existing; int save_opt_ignore_existing = opt_ignore_existing; int save_do_progress = do_progress; + int save_make_backups = make_backups; allowed_lull = read_batch ? 0 : (io_timeout + 1) / 2; lull_mod = allowed_lull * 5; @@ -1240,6 +1241,7 @@ void generate_files(int f_out, struct fi phase++; only_existing = save_only_existing; opt_ignore_existing = save_opt_ignore_existing; + make_backups = save_make_backups; if (verbose 2) rprintf(FINFO,generate_files phase=%d\n,phase); 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: backup option
Thanks for quick turn around. I will test it out and let you know the results. -Original Message- From: Wayne Davison [mailto:[EMAIL PROTECTED] Sent: Thursday, April 07, 2005 3:13 AM To: Chimento, Douglas Cc: rsync@lists.samba.org Subject: Re: backup option On Wed, Apr 06, 2005 at 05:42:19PM -0400, Chimento, Douglas wrote: I have question about the behavior of --backup-dir with --delete-after option. You've discovered a bug in generator.c. It is fixed by this patch: --- generator.c 5 Apr 2005 20:08:51 - 1.198 +++ generator.c 7 Apr 2005 08:07:10 - @@ -1132,6 +1132,7 @@ void generate_files(int f_out, struct fi int save_only_existing = only_existing; int save_opt_ignore_existing = opt_ignore_existing; int save_do_progress = do_progress; + int save_make_backups = make_backups; allowed_lull = read_batch ? 0 : (io_timeout + 1) / 2; lull_mod = allowed_lull * 5; @@ -1240,6 +1241,7 @@ void generate_files(int f_out, struct fi phase++; only_existing = save_only_existing; opt_ignore_existing = save_opt_ignore_existing; + make_backups = save_make_backups; if (verbose 2) rprintf(FINFO,generate_files phase=%d\n,phase); 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
backup option
Hi, I have question about the behavior of --backup-dir with --delete-after option. In my testing with version 2.6.4, it appears that the backup option only backups altered files. Files that will be deleted on the destination system will NOT be placed in --backup-dir location. I would like to back up deleted files. Is there a way to do this? Thanks -- 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: permissions bug w/ --backup-dir or --backup option?
Carey, What you are seeing is, in fact, the case, but the function that creates the dirs is robust_move() in backup.c The backup option captures files and/or directories that are deleted or changed between syncs. So, if a directory is *changed* (deleted/renamed/moved), then the directory *and* it's permissions are copied over. If a file (node, etc.) is changed, then the file and it's permissions are carried over. If a directory is created by rsync simply to position a changed file, then no permissions are carried over to that directory (they are explicitly created 0755 by robust_move()). This works great for us, because 1) it's faster, and 2) we really don't care about the directory permissions/owners unless the directory is changed directly by a move/rename/delete. That said, you do have a point. (And, just because I don't use it, doesn't mean it's not right :^) Add one line to backup.c to do your thing. There will be a little overhead, but it will work they way you want it to work, and smack permissions on all directories on the backup-dir path leading to the changed file(s). ** This patch works with both 2.4.6 and 2.4.7pre1 -- jmd ** ** Don't forget to convert CR/LF (Dos Format) to LF (Unix Format) ** ** before patching. Edit to remove line wraps, as well. ** -- Cut here *** backup.c.orig Sat Aug 19 08:10:39 2000 --- backup.cThu Sep 20 08:17:19 2001 *** *** 266,271 --- 266,272 /* move to keep tree if a file */ if(!kept) { + make_bak_dir(fname,backup_dir); /* Set up permissions for path - jmd */ if (!robust_move (fname, keep_name)) rprintf(FERROR, keep_backup failed %s - %s : %s\n, fname, keep_name, strerror(errno)); -- Cut here Good suggestion, Carey! Jim Delahanty [EMAIL PROTECTED] Carey Jung wrote: James, I think the problem with --backup-dir lies in make_bak_dir in backup.c. From what I can tell by looking at the code, as it builds the backup directory path, it's not setting mod times, ownership, and permissions on the backed up directories, just on the backed up file. Make sense? Carey
RE: permissions bug w/ --backup-dir or --backup option?
And we've done 19,658 runs so far (8/server/day), over 380 Gigs sync'd with an average of 44Meg(11Meg compressed) of data per run, and all of our backup files come across with correct owners and permissions. Whew! I'd look to your filesystem first. Do the rsync'd files (not backup-dir files) come across with the right permissions? Yes, the backed up file permissions are correct. The files that get moved to the backup-dir are not, though. Looking at it a littler closer, though, I think it's just the directory permissions/ownership that are getting lost. Permissions/ownership of individual files are preserved properly. Here's some further data: Command line (running as root): rsync -avz --timeout=0 --partial --force --ignore-errors --bwlimit=0 --stats -- \ numeric-ids --delete --backup --backup-dir=/archive/current/previous/server Sample permissions in backup directory: cd /archive/backups/current/server ls -ld home/company drwxrws--- 24 508 company 4096 Sep 18 12:04 home/company Sample permissions in backup-dir directory: cd /archive/backups/previous/server ls -ld home/company drwxr-xr-x 6 root root4096 Sep 18 12:04 home/company Carey
permissions bug w/ --backup-dir or --backup option?
Running rsync 2.4.7pre1, using the --backup-dir option, I just realized today that file ownerships and permissions of backed up files are not preserved. In other words, if rsync moves an obsolete file to the backup dir, it's ownership seems to revert to root:root, and permissions change, as well. We are also using the -a (archive) option, by the way, which should mean preserve everything. This loss of ownership/permissions seems like a definite bug to me. What do you think? Regards, Carey Jung IT Freedom
RE: permissions bug w/ --backup-dir or --backup option?
By the way, if it makes a difference, our backup-dir is on a different partition than the destination directory. I'm not sure if --backup permissions/ownership are preserved properly if done on the same partition. Carey -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Carey Jung Sent: Wednesday, September 19, 2001 12:38 AM To: rsync list Subject: permissions bug w/ --backup-dir or --backup option? Running rsync 2.4.7pre1, using the --backup-dir option, I just realized today that file ownerships and permissions of backed up files are not preserved. In other words, if rsync moves an obsolete file to the backup dir, it's ownership seems to revert to root:root, and permissions change, as well. We are also using the -a (archive) option, by the way, which should mean preserve everything. This loss of ownership/permissions seems like a definite bug to me. What do you think? Regards, Carey Jung IT Freedom