Note: this wiki is no longer maintained. If you have any questions related to this wiki, please post them on the CrunchBang forums.

Translations of this page?:

NETWORKING Backup using Rsync

Rsync is a command line backup utility, capable of backing up to a remote machine over NETWORKING SSH (English), it also has the advantage of only transferring diffs, and can compress data on the fly, meaning that it isn't bandwidth heavy.

Usage

The following command will backup your home directory to a remote computer over SSH to the backup folder.

rsync -a -z -v -h -P --delete --exclude=.local/share/Trash ~ user@user-server:~/backup
  • '-a' archive mode, backs up all sub directories as well as symlinks etc.
  • '-z' compress data before it is transmitted
  • '-v' verbose
  • '-h' format sizes to be more readable
  • '-P' equivalent to –progress (prints progress, time remaining etc) and –partial (don't delete partially backup files, to continue transferring later).
  • '--delete' delete files on the remote computer that no longer exist on the local computer.
  • '--exclude' exclude a file or directory or file from the backup, in this case the trash folder.

to restore the files to the original computer:

rsync -av  user@user-server:~/backup ~ 

there are many more options:

man rsync

will give you more detailed information on all available commands.

Links

 
howto/ssh_rsync_backup.txt · Last modified: 2012/05/24 06:18 by machinebacon
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported

Powered by DokuWiki. Hosted by Linode.
Copyright © 2010 CrunchBang Linux.
Proudly powered by Debian GNU/Linux.
Debian is a registered trademark of Software in the Public Interest, Inc.