Jump to content

Rsync


narkeddiver

Recommended Posts

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

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

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 by Wonka
Link to comment
Share on other sites

  • 3 weeks later...

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.






×
×
  • Create New...