narkeddiver Posted April 23, 2014 Share Posted April 23, 2014 Hi, Does anyone here use Rsync to keep folders on separate macs in sync? I want to back some folders on my Mac mini to an external drive on my wife's mac book I would also like to back up my wife's photo library to a folder on an external drive on my Mac mini I would appreciate any advice or pointers to some good websites Thanks in advance Link to comment Share on other sites More sharing options...
nullx8 Posted April 23, 2014 Share Posted April 23, 2014 rsync -avx --progress /original/location/Documents/ /Volumes/mountpointofbackupdisk/DataBackup/ quite straight forward.write that in a sh file .. and create a applescript, then you will have a cute icon to click on and you not have to type it always again Link to comment Share on other sites More sharing options...
Wonka Posted April 23, 2014 Share Posted April 23, 2014 (edited) I would also use the -X option for extended attributes (if they are used on Mac) After a first backup, you can make full backup in an incremental way. Make a hard linked copy of the old backup (it is very fast) and use rsync on top of that. I don't know the differences between Mac and linux, but maybe you can use my script in some way: #!/usr/bin/shMOUNT_T=`lsblk|grep /mnt`if test -z "${MOUNT_T}"; then (echo "Cannot mount, /mnt already mounted" && exit); fimount -L "backup" /mnt || (echo -e "\nMount failed! Wrong disk/label?" && exit)# Disks used for backup must have label "backup"RECENT=`ls -A /mnt/backup|grep -e "^[0-9]"|sort|tail -1`NEW=`date +%y%m%d:%H%M%S`;echo $RECENT $NEWif test -z $RECENT; then mkdir -p /mnt/backup/${NEW}/localhost;else cp -al /mnt/backup/$RECENT /mnt/backup/${NEW}/; fiif test -z $RECENT; then mkdir -p /mnt/backup/${NEW}/localhost;else cp -al /mnt/backup/$RECENT /mnt/backup/${NEW}/; firsync -aXxv --delete --relative --delete-excluded \ /bin \ /boot \ /.config \ /etc \ /home --exclude=/home/user/.thumbnails/* --exclude=/home/user/.kde4/share/apps/nepomuk/* \ --exclude=/home/archlinux/* --exclude=/home/user/.cache/chromium/* --exclude=/home/user/.ccache/* \ /lib \ /lib64 \ /opt \ /root --exclude=/root/.thumbnails/*/* --exclude=/root/.kde4/share/apps/nepomuk/* \ /sbin \ /usr \ /var --exclude=/var/log/ --exclude=/var/db/sudo/ --exclude=/var/tmp/ \ /mnt/backup/${NEW}/localhost/ && \ df -h && \ sync && \ du -csh /mnt/backup/* && \ sync && \ umount -v /mnt || echo -e '\nError backing up - or unmounting disk !!!!!!!!!!' Edited April 23, 2014 by Wonka Link to comment Share on other sites More sharing options...
Wonka Posted April 23, 2014 Share Posted April 23, 2014 The formatting in the code box went terribly wrong. I can PM you if you want a more readable script Link to comment Share on other sites More sharing options...
narkeddiver Posted April 24, 2014 Author Share Posted April 24, 2014 Thank you for the help guys - I may have some follow up questions if I get stuck Link to comment Share on other sites More sharing options...
negreanu Posted April 26, 2014 Share Posted April 26, 2014 Would just use dropbox or similar these days rather than rsync. Link to comment Share on other sites More sharing options...
nullx8 Posted May 17, 2014 Share Posted May 17, 2014 Would just use dropbox or similar these days rather than rsync. Yes rsync to the dropbox folder. Saves the trouble about mounting nfs and laggy os if they unavaiable. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now