Solusi Backup Linux [2]

7 Sep

B. Mengenal rdiff-backup

A remote incremental backup of all your files could be as easy as “rdiff-backup / host.net::/target-dir”

‘rdiff-backup backs up one directory to another, possibly over a network. The target directory ends up a copy of the source directory, but extra reverse diffs are stored in a special subdirectory of that target directory, so you can still recover files lost some time ago. The idea is to combine the best features of a mirror and an incremental backup. rdiff-backup also preserves subdirectories, hard links, dev files, permissions, uid/gid ownership, modification times, extended attributes, acls, and resource forks. Also, rdiff-backup can operate in a bandwidth efficient manner over a pipe, like rsync. Thus you can use rdiff-backup and ssh to securely back a hard drive up to a remote location, and only the differences will be transmitted. Finally, rdiff-backup is easy to use and settings have sensical defaults.’

mulai menggunakan
1. download [saya menggunakan centos 4.7]
ftp://fr.rpmfind.net/linux/dag/redhat/el4/en/i386/dag/RPMS/rdiff-backup-1.2.8-1.el4.rf.i386.rpm

2. install
[root@linux ~]# rpm -ivh rdiff-backup-1.2.8-1.el4.rf.i386.rpm
warning: rdiff-backup-1.2.8-1.el4.rf.i386.rpm: V3 DSA signature: NOKEY, key ID 6b8d79e6
Preparing… ########################################### [100%]
1:rdiff-backup ########################################### [100%]

3. perintah – perintah rdiff-backup
==========================================================
3a. untuk backup : /usr/bin/rdiff-backup [yang_dibackup] [lokasi_backup]
==========================================================
[root@linux s11]# ls -la /s11/foto_logistik/*.txt
-rw-r–r– 1 root foto_logistik 11 Sep 2 13:43 /s11/foto_logistik/test.txt
[root@linux s11]# /usr/bin/rdiff-backup /s11/ /backup/s11


==========================================================
3b. untuk list backup : /usr/bin/rdiff-backup -l [lokasi_backup]
==========================================================
[root@linux /]# /usr/bin/rdiff-backup -l /backup/s11/
Found 4 increments:
increments.2009-09-02T13:14:11+07:00.dir Wed Sep 2 13:14:11 2009
increments.2009-09-02T13:28:06+07:00.dir Wed Sep 2 13:28:06 2009
increments.2009-09-02T13:44:04+07:00.dir Wed Sep 2 13:44:04 2009
increments.2009-09-02T13:51:29+07:00.dir Wed Sep 2 13:51:29 2009
Current mirror: Wed Sep 2 14:30:02 2009


==========================================================
3c. untuk restore : /usr/bin/rdiff-backup -r now [lokasi_backup] [lokasi_restore]
==========================================================
[root@linux s11]# /usr/bin/rdiff-backup -r now /backup/s11/foto_logistik/test.txt /s11/foto_logistik/test.txt
[root@linux s11]# /usr/bin/rdiff-backup -r now /backup/s11/foto_logistik/test.txt /s11/foto_logistik/test2.txt
[root@linux s11]# ls -la /s11/foto_logistik/*.txt
-rw-r–r– 1 root foto_logistik 11 Sep 2 13:43 /s11/foto_logistik/test2.txt
-rw-r–r– 1 root foto_logistik 11 Sep 2 13:43 /s11/foto_logistik/test.txt


==========================================================
3d. untuk restore : /usr/bin/rdiff-backup -r [jam tertentu] [lokasi_backup] [lokasi_restore]
==========================================================
[root@linux /]# rdiff-backup -r 2009-09-02T13:44:04+07:00 /backup/s11/foto_logistik/test.txt /s11/foto_logistik/test3.txt
[root@linux /]# rdiff-backup -r 2009-09-02T13:51:29+07:00 /backup/s11/foto_logistik/test.txt /s11/foto_logistik/test4.txt
[root@linux /]# rdiff-backup -r now /backup/s11/foto_logistik/test.txt /s11/foto_logistik/test5.txt

==========================================================
3e. hapus archive
==========================================================
[root@linux s11]# /usr/bin/rdiff-backup –remove-older-than 3D /backup/s11

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: