How To remote backup with rsync

This is probably the simply way to backup data to other server using a secure protocoal an minimum bandwidh.

Note: – Is the backup server – Is the server you want to backup

Login to the server you want to backup

1. Creating a key with the ssh-keygen utility:

# ssh-keygen -t rsa -N ” (these are two single quotes)

2. Copy RSA encryption key to the backup server:

# scp ~/.ssh/
# ssh mergekeys

Now you can backup a folder without prompting for a password:

# rsync -avz -e ssh /etc/folder :folder_on_server1

Rsync configuration Examples:

Back up entire server:

rsync -avz –exclude=/proc -e ssh /

Back up home directories:

rsync -avz -e ssh /home

Back up specific users:

rsync -avz -e ssh ~user1 ~user2 ~user3

Put it on crontab:

# nano /etc/crontab

Add this line:

13 3 * * * root rsync -avz -e ssh /home

Save and Exit

2 thoughts on “How To remote backup with rsync

  1. RSS feed is not working in chrome, Kindly fix it.

    • thank you for your comment. I will try to improve that section. Thank you for your valuable suggestion.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.