This method backups only files that have changed since the last backup. If a file has been deleted it will delete the equivalent file in the backup folder.
rsync -a source_directoy --delete destination
Usually, the backup location will be another PC, which can be done like this;
rsync --rsh=/usr/bin/ssh source_dir destIP:/destination_dir
eg:
rsync --rsh=/usr/bin/ssh ~ 10.1.1.2:/usr/backups/brett
will back up your home directory
Notes:
You can use a name instead of an IP address
Exclude unwanted files with the --exclude="filename" argument;
The above example will require a user account using the same name on both PC's
The destination PC will require ssh server software
sudo-apt-get install openssh-server
No comments:
Post a Comment