Backup using rsync in Linux

Posted on January 9, 2008

Backup your Server’s files to a remote host using rsync

Setup SSH RSA Authentication

#ssh-keygen -t rsa
#scp .ssh/id_rsa.pub user@remote-host:/user/
#ssh user@remote-host
#cat id_rsa.pub >> .ssh/authorized_keys

Make sure that .ssh/authorized_keys has the following permission

-rw-r–r– 1 user user 393 Jan 9 09:45 authorized_keys

Backup your folder to a remote host using rsync

rsync -avhe ssh –delete /folder-to-backup user@remote-host:/backup-folder

 

For an automated backup, use cron. For other rsync command switches, refer to the documentation or issue the command “man rsync”

 

 

» Filed Under Linux/Nix

Comments

Leave a Reply




*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-spam image


Directory of Personal Blogs
Technology Blogs - BlogCatalog Blog Directory Personal - Top Blogs Philippines