Friday, February 7, 2014

Managing backups



Managing backups


Backup is very crucial to any system, whether running in isolation or a networked environment. You can use rsync to create backups for your system. Rsync is a fi le synchronisation utility. It provides the following features which make it a perfect tool for backups:

• Differential copy: This means it will only copy the bits that have actually changed.
• On-the-fl y compression: This type of compression makes the backups fast and consumes less bandwidth.
• Security: You can user the Secure Shell protocol (SSH) to do the backups, which makes the process of backing up very secure.
• Easy to use: rsync is very easy to use, almost like the cp command but with better features.

To do a local backup:
# rsync -azvv <foldertobackup>
<destinationfolder>

To do a remote backup over SSH (this will require OpenSSH server to be installed and started on the remote system):
# rsync --delete -azvv -e -ssh /source/folder
user@remotemachine:/destination/folder

Here’s a breakdown of the options we’ve used:

-a preserves the timestamps and permissions of the fi les

-z compresses the data

-vv verbose output

-e sets the shell use for the transfer. Here we are
specifying the SSH shell.

You can put these commands to the crontab file for regular differential backups.

No comments:

Post a Comment