temp name for destination directory, move in place after successfull complete?
Hello everyone, In --link-dest/--copy-dest/--compare-dest modes, I'd like to distinguish between destination directories that have been completely rsynced and the ones that are only partially synced because of a network failure. In short, I'd like to mimic the behaviour rync has on individual files (building them as .filename-random and then renaming them to filename) for the whole destination directory. Of course, I could instruct rsync to create .destination-random rather than just destination. However, I think I cannot rename the temporary directory after successfull completion via the rsync protocol (this would need shell access or a mounted filesystem, both of which I want to avoid). Is there any way to do this magic with rsync, or maybe is there any option that removes the whole destination again if something went wrong? Best regards, Andreas -- 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: rsync email notification on success and failure + Log
Hi: Let cron(8) run your script for you. Cron will happily email you the verbose output from rsync after its task has run. man cron man crontab man 5 crontab On Tue, Dec 29, 2009 at 7:12 PM, Sébastien Arpin sebar...@hotmail.com wrote: Hi, I have a bash script for rsync that should tranfer all my filer from one drive to the other. I would like to know how I can make the script sending me an email after the script is run and be able to know if it was a success or not and also if possible to include the log file. This is my script: !/bin/bash rsync -av --delete --log-file=/home/duffed/RSyncLog/$(date +%Y%m%d)_rsync_Multimedia.log /media/Multimedia/ /media/MultimediaBackUp Thanks a lot! Sébastien -- 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 -- W. Oates -- 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
Occasional but consistent trouble with --filter
I'm running rsync version 3.0.6 in order to migrate a set of objects from an old server to a new one. The set of object to migrate is basically composed of mail dirs which follow a well-defined name pattern, such that I believe it should be easily handled by the --filter option. I'm infact attempting to use the following rsync command in the new server: rsync -auEAXDSvz --delete-after --numeric-ids --compress-level=9 --stats --super --progress -e 'ssh -oCompression=no' '--filter=-!r /srv/vhome/*/users/*/.mail/' u...@oldserver:/srv/vhome /srv/ The command works *mostly* well, but occasionally (and consistently) it attempts migrating or deleting stuff whose pathname seems not match the filter spec above. In example, the command always tries migrating files from /vhome/xxx/home/www/admin/stats/, which I think can't fit in the /srv/vhome/*/users/*/.mail/ filter. Are double-wildcard filters like the one I'm using allowed in rsync? Is there any way to circumvent this problem? Please note that I can't simply merge the whole /srv/vhome/ dir, since I'm attempting to complete the second phase of this server migration: all the non mail related stuff had already been transferred and now is probably more recent on the new server than on the old one... Also note that the following command: find /srv -type d -wholename '/srv/vhome/*/users/*/.mail' do selects the right directories to migrate and only them. Thanks, Giampaolo -- 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
Rsync, CP and Cron job workaround?
Hi, I have a Linux based NAS, which unfortunately appears to be a bit underpowered, heres why I say that: 5 PC's backup to the NAS on a weekly full with hourly incrementals 7 days a week between 7am and 6pm (2 week retention policy). There is no problem with that. Where there is a problem is getting that data off the NAS to the USB attached storage for off site (2 disks swapped weekly). The built in RSYNC via the web gui takes about 3 days to sync to USB after the weekly full (Sun night)- 100% CPU. The fulls are about 20-40Gb each. I was thinking about one of two ways around this: 1. using cron and cp copy the weekly fulls to the USB storage, then use nightly rsyncs to keep everything else up to date. I am assuming here that rsync wont recopy the stuff copied with cp? The logic of the cp cron job would need to be something like: *delete stuff created over 8 days ago *copy all files in backup dir recursively that dont already exist (should only be full backups) *run a rsync for cleanup 2. use rsync exclusively, but schedule it to only run it outside of business hours, ie let it run from 7pm -5am and kill it at 5am. Over the course of the week it should catch up? Any thoughts on these two methods? I realise that option 1 gives you no assurance that the copy completed successfully. Cheers -Al -- View this message in context: http://old.nabble.com/Rsync%2C-CP-and-Cron-job-workaround--tp26989197p26989197.html Sent from the Samba - rsync mailing list archive at Nabble.com. -- 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: Occasional but consistent trouble with --filter
On Fri, Jan 1, 2010 at 7:46 AM, Giampaolo Tomassoni giampa...@tomassoni.biz wrote: '--filter=-!r /srv/vhome/*/users/*/.mail/' u...@oldserver:/srv/vhome /srv/ See the manpage discussion of anchoring at the top-level of the transfer for why your filter rule should not have a /srv prefix. The 'r' modifier makes the rule only apply on the receiving side, which means you're specifying a protect rule to prevent removal of files, but does not stop the files from being copied. The '!' modifier negates the match, which makes it protect everything from deletion except .mail dirs (though, since its anchored wrong, it would seem to protect everything from deletion). Perhaps you wanted to specify --filter='- /vhome/*/users/*/.mail/' (for both excluding and deleting of that dir)? If not -- if you're really trying to copy just hte .mail dirs, you have a lot more things to change. ..wayne.. -- 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: Rsync, CP and Cron job workaround?
rsync version is 3.0.6 protocol version 30. -Al -- View this message in context: http://old.nabble.com/Rsync%2C-CP-and-Cron-job-workaround--tp26989197p26990034.html Sent from the Samba - rsync mailing list archive at Nabble.com. -- 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