TAR
We have two different backup, full backup and incremental backup.
Let's pick our backup folder as /srv/www/htdocs.
To do a full backup, you need to prompt this command
cd /srv/www
tar cvz -g /tmp/backup/snapshot_htdocs -f /tmp/backup/htdocs_full.tar.gz htdocs
To do a incremental backup.
tar cvz -g /tmp/backup/snapshot_htdocs -f /tmp/backup/htdocs_incremental.tar.gz htdocs
RSYNC
Rsync backup is much more better than tar. Both incremental and full backup can use the same command to execute. Rsync will pick the changes on backup target without capturing the file snapshot.
rsync -ave ssh root@ip_addr_to_be_backup:/home/users /tmp/backup_dir
2 comments:
Why not use rdiff-backup?
Wow its so easy, thanks for the valuable post.
Back up Files
Post a Comment