How to: Syncronize home folder from HD to external HD

  • Thread starter Deleted member 58914
  • Start date
D

Deleted member 58914

Guest
The command I had been using to backup from the hd to the external hd is the following, you will need to have installed rsync.
Code:
rsync -avz --delete /home/YOURUSERNAME/SOURCEFOLDER/ /media/DISKNAME/BACKUPFOLDER/

This reverse command will restore the backup from the external hd to the hd.
Code:
rsync -avz --delete /media/DISKNAME/SOURCEFOLDER/ /home/YOURUSERNAME/TARGETFOLDER/

Due to the "--delete", it will delete any files which exists at the target but do not exists at the source, that is why I called it syncronize instead of a simple backup. If you want to test without the risk of losing your files, remove the "--delete"
 
Back
Top