Re: Using rsync as an incremental backup
I'm using rsync to do an incremental backup of my desktop here, to a remote server as follows: #/usr/bin/bash old=$(date -d 'now - 1 week' +%Y-%m-%d) new=$(date +%Y-%m-%d) rsync -avP --delete --link-dest=../$dir /home/bakers bak...@perturb.org:/home/bakers/backup/$new/ This is actually working GREAT! The only problem is that sometimes the cronjob won't complete (internet is down, something like that). When it tries to run the next week it does --link-dest against a dir that doesn't exist. It happily complies and transfers EVERY file because there is no source to hardlink from. I'd really like rsync to exit and throw an error if the --link-dest isn't present. I can't find anything in the man page about any fancy --list-dest options. Am I missing it? Hopefully, Scott's suggestion will solve this issue for you. You may also be interested in the way LBackup works for hard-linked incremental backups. It uses a numbering system rather than a date system. If you still want to have the date named entries within the file system, it is just a matter of enabling a post-action which keeps a date-named symbolic links directory to these backup snapshots up to date. Details on the LBackup post and pre actions are available from the following URLs : - http://www.lbackup.org/pre_and_post_actions (basic intro on LBackup pre/post actions) - http://bit.ly/lIMfAo (source code for the example post action script mentioned) This is all just another way of approaching this issue which you may find of interest. The one issue is that the script (source code link above) will need to be run on a system which has access to the file system which stores the snapshots. It would require modification if you wanted to run it on a remote system. Hope this helps :^) - This email is protected by LBackup, an open source backup solution. 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
[Bug 8265] Various corruption of devices and sockets
https://bugzilla.samba.org/show_bug.cgi?id=8265 --- Comment #8 from Matt McCutchen m...@mattmccutchen.net 2011-06-26 16:11:35 UTC --- (In reply to comment #7) Not sure if the patch is ok, rsync stalls in some different cases and needs ctrl-c. As you can see, all the patch does is add print statements, so the hang must be the result of a timing-dependent bug that was triggered by the addition of the debug output. # rsync -nHaxi --delete /dev/ ./empty/ ... [sender] i=4302 /dev zs0 mode=020600 len=0 uid=0 gid=0 flags=0 [sender] i=4303 /dev fd/ mode=040555 len=1024 uid=0 gid=0 flags=4 send_file_list done file list sent ^C[sender] _exit_cleanup(code=20, file=rsync.c, line=549): entered rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(549) [sender=3.0.8] [sender] _exit_cleanup(code=20, file=rsync.c, line=549): about to call exit(20) rsync: writefd_unbuffered failed to write 96 bytes to socket [Receiver]: Broken pipe (32) DEBUG 9: make_file(./fd1.1440): major(tmp_rdev) = 9 DEBUG 1: send_file_entry(fd1.1440): major(rdev) = 9 DEBUG 3: send_file_entry(fd1.1440): XMIT_SAME_RDEV_MAJOR DEBUG 9: make_file(./rfd1.1440): major(tmp_rdev) = 9 DEBUG 1: send_file_entry(rfd1.1440): major(rdev) = 9 DEBUG 6: recv_file_entry(fd1.1440): XMIT_SAME_RDEV_MAJOR, rdev_major was 3 Well that's interesting, the receiver's rdev_major value got out of sync with the sender's. recv_file_entry::rdev_major is zero-initialized and the only assignment to it is instrumented with DEBUG 5, so unless you redacted a previous device with major number 3 from the output, the value 3 could only appear via memory corruption. The fastest way to find the problem is probably to use a gdb watchpoint, like this: $ gdb --args rsync -nHaxi --delete /dev/ ./empty/ (gdb) set follow-fork-mode child (gdb) watch recv_file_entry::rdev_major (gdb) run ... (gdb) bt You could also try running rsync under valgrind if convenient. -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the QA contact for the bug. -- 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
[Bug 7622] Factor out common logic from itemize and unchanged_attrs functions
https://bugzilla.samba.org/show_bug.cgi?id=7622 --- Comment #1 from Matt McCutchen m...@mattmccutchen.net 2011-06-26 20:46:51 UTC --- Created attachment 6630 -- https://bugzilla.samba.org/attachment.cgi?id=6630 Patch W00t! My first patch since about a year ago! Also in my repository at https://mattmccutchen.net/rsync/rsync.git/?a=commitdiff;h=ddc5ae3d9e6cc632b93bac327b6f92d0545b0537 . -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the QA contact for the bug. -- 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
does rsync not preserve directory mtimes?
Hi, I'm running the following command as a local copy command. faheem@bulldog:/mnt/data$ sudo rsync -abvz --super /data/ . Origin directory faheem@bulldog:/data$ ls -la total 28 drwxr-xr-x 7 root root 4096 Jun 26 08:34 . drwxr-xr-x 25 root root 4096 Apr 13 17:09 .. drwxr-xr-x 2 owzar001 root 4096 Nov 6 2010 CTS drwxr-xr-x 2 owzar001 owzar001 4096 Aug 27 2010 GAW drwxr-xr-x 2 owzar001 owzar001 4096 Oct 21 2010 KOSIM drwxr-xr-x 5 faheem faheem 4096 Aug 11 2010 snppy drwxrws--- 9 faheem faheem 4096 Jun 26 08:40 WebAPP Destination directory faheem@bulldog:/mnt/data$ ls -la total 44 drwxr-xr-x 8 root root 4096 Jun 26 11:54 . drwxr-xr-x 3 root root 4096 Jun 26 11:32 .. drwxr-xr-x 2 owzar001 root 4096 Jun 26 11:54 CTS drwxr-xr-x 2 owzar001 owzar001 4096 Jun 26 11:54 GAW drwxr-xr-x 2 owzar001 owzar001 4096 Jun 26 11:54 KOSIM drwx-- 2 root root 16384 Jun 26 11:24 lost+found drwxr-xr-x 5 faheem faheem4096 Jun 26 11:54 snppy drwxrws--- 10 faheem faheem4096 Jun 26 14:07 WebAPP As you can see, the mtime for example of CTS is not preserved? Am I missing something? Please CC me on any reply. Thanks. Regards, Faheem -- 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: does rsync not preserve directory mtimes?
On Mon, 2011-06-27 at 03:01 +0530, Faheem Mitha wrote: I'm running the following command as a local copy command. faheem@bulldog:/mnt/data$ sudo rsync -abvz --super /data/ . Origin directory faheem@bulldog:/data$ ls -la total 28 drwxr-xr-x 7 root root 4096 Jun 26 08:34 . drwxr-xr-x 25 root root 4096 Apr 13 17:09 .. drwxr-xr-x 2 owzar001 root 4096 Nov 6 2010 CTS drwxr-xr-x 2 owzar001 owzar001 4096 Aug 27 2010 GAW drwxr-xr-x 2 owzar001 owzar001 4096 Oct 21 2010 KOSIM drwxr-xr-x 5 faheem faheem 4096 Aug 11 2010 snppy drwxrws--- 9 faheem faheem 4096 Jun 26 08:40 WebAPP Destination directory faheem@bulldog:/mnt/data$ ls -la total 44 drwxr-xr-x 8 root root 4096 Jun 26 11:54 . drwxr-xr-x 3 root root 4096 Jun 26 11:32 .. drwxr-xr-x 2 owzar001 root 4096 Jun 26 11:54 CTS drwxr-xr-x 2 owzar001 owzar001 4096 Jun 26 11:54 GAW drwxr-xr-x 2 owzar001 owzar001 4096 Jun 26 11:54 KOSIM drwx-- 2 root root 16384 Jun 26 11:24 lost+found drwxr-xr-x 5 faheem faheem4096 Jun 26 11:54 snppy drwxrws--- 10 faheem faheem4096 Jun 26 14:07 WebAPP As you can see, the mtime for example of CTS is not preserved? Am I missing something? From the man page: -b, --backup [...] Note that if you don’t specify --backup-dir, (1) the --omit-dir-times option will be implied, [...] -- 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: does rsync not preserve directory mtimes?
On Sun, 26 Jun 2011, Matt McCutchen wrote: From the man page: -b, --backup [...] Note that if you don’t specify --backup-dir, (1) the --omit-dir-times option will be implied, [...] Thanks for the fast explanation. I was using this flag out of force of habit. Regards, Faheem-- 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
[Bug 8266] fileflags.diff compile fix
https://bugzilla.samba.org/show_bug.cgi?id=8266 --- Comment #3 from Chris Dunlop ch...@onthe.net.au 2011-06-27 05:52:54 UTC --- In gmane.network.rsync.general, Wayne Davison wrote: Note that it is always nice to generate a patch on the files themselves, not a patch of a patch. Patch files are auto-generated. No worries. Out of interest, what form is the original form from which the patch files are auto-generated, e.g. git branches? -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the QA contact for the bug. -- 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
[SCM] The rsync repository. - annotated tag v3.0.9pre1 created
The annotated tag, v3.0.9pre1 has been created at 75b5194213a9f047278a3adc8d785530a9f53b13 (tag) tagging 93bdc6478e8d8a392b318f3986f9799ac3203d0e (commit) replaces v3.0.8 tagged by Wayne Davison on Wed Jun 22 08:38:49 2011 -0700 - Log - Version 3.0.9pre1. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEABECAAYFAk4CDIkACgkQbIWfsUuWqMUdYQCgrN8lYLRXmjnvJIBO/nS6hEyX 3C0AnR0cJNhr1GYHBsEcQir/XwhBvd4F =x6bE -END PGP SIGNATURE- Wayne Davison (11): Fix a potential crash when trying to find a better block match. Avoid adding a slash to path '/'. Expand NO_ENTRY items from fake-super ACLs in get_rsync_acl(). Fix unwritable directory issue due to misordered chmod call. Linux needs symlink xattrs. Fixes bug 8201. Don't force \(em in the manpages. Fixes bug 7941. Mention coming Solaris support. Prepare for 3.0.9pre1 release. Make daemon-exclude errors more error-like. Mention latest fix. Preparing for release of 3.0.9pre1 --- -- The rsync repository. ___ rsync-cvs mailing list rsync-cvs@lists.samba.org https://lists.samba.org/mailman/listinfo/rsync-cvs
[SCM] The rsync repository. - branch b3.0.x updated
The branch, b3.0.x has been updated via 121082f Fix #ifdef in unchanged_attrs(). Fixes bug 8268. from c6bed2d Explicitly mention spaces in the path setting. ;a=shortlog;h=b3.0.x - Log - commit 121082fa9b375666e06a8fc6e476aaecb307079f Author: Wayne Davison way...@samba.org Date: Sun Jun 26 09:52:40 2011 -0700 Fix #ifdef in unchanged_attrs(). Fixes bug 8268. --- Summary of changes: generator.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/generator.c b/generator.c index d7e1ba8..089672e 100644 --- a/generator.c +++ b/generator.c @@ -630,7 +630,7 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp) if (perms_differ(file, sxp)) return 0; #endif -#ifndef CAN_CHOWN_SYMLINK +#ifdef CAN_CHOWN_SYMLINK if (ownership_differs(file, sxp)) return 0; #endif -- The rsync repository. ___ rsync-cvs mailing list rsync-cvs@lists.samba.org https://lists.samba.org/mailman/listinfo/rsync-cvs
[SCM] The rsync repository. - branch master updated
The branch, master has been updated via 01580c7 Fix #ifdef in unchanged_attrs(). Fixes bug 8268. from a59a7b2 Fix reading side of fake-symlink bug 7109. ;a=shortlog;h=master - Log - commit 01580c794a40bb89c40ba03c2d73d640a28bd292 Author: Wayne Davison way...@samba.org Date: Sun Jun 26 09:52:40 2011 -0700 Fix #ifdef in unchanged_attrs(). Fixes bug 8268. --- Summary of changes: generator.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/generator.c b/generator.c index 8491300..e24f20f 100644 --- a/generator.c +++ b/generator.c @@ -443,7 +443,7 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp) if (perms_differ(file, sxp)) return 0; #endif -#ifndef CAN_CHOWN_SYMLINK +#ifdef CAN_CHOWN_SYMLINK if (ownership_differs(file, sxp)) return 0; #endif -- The rsync repository. ___ rsync-cvs mailing list rsync-cvs@lists.samba.org https://lists.samba.org/mailman/listinfo/rsync-cvs