Linux / Fedora Core: How To Use rdiff-backup To Pull Backups Linux��/�L���n�O�U�֤ߡG�p��ϥ�rdiff�ƥ��M�X�ƥ�
rdiff-backup rdiff�ƥ� is a popular, free, open source mirroring and incremental backup system for posix based operating systems like linux & Mac OS X. It uses rysnc algorithm through librsync but it doesn't use rsync.�O�@�Ө��w�諸�A�K�O�A�ۥѡA�}�X�蹳�M�W�q�ƥ��t�Ϊ�POSIX����¦���ާ@�t�ΡA�ҦpLinux�MMac OS X�W�ϥ�rysnc��k�q�Llibrsync �A��ä��ݭn�ϥ�rsync �C The documentation of rdiff-backup focuses on push model for backup where client machines pushes their backup data to backup server.���rdiff�ƥ������I�O���ʼҦ��ƥ����a��Ȥ�ݾ������ʥL�̪��ƾڳƥ���ƥ��A�Ⱦ��C This model is problematic when the backup server is on a well protected secure network behind a firewall.�o�ؼҦ��O�����D�ɡA�ƥ��A�Ⱦ��O�b�@�ӫܦn���O�@�����w��������᭱�C Client machines on external servers cannot easily connect to a machine behind firewall without punching a hole which reduces security of the system.�Ȥ�ݾ�����~���A�Ⱦ�������s����@�x�����b������᭱�A�S���R���@�Ӭ}�A�q�ӭ��C�F�t�Ϊ��w���ʡC A better alternative is to use the pull model where the backup server requests for backup from client machine, at regular intervals, over secure ssh connection.��n�����N��k�O�ϥΤU�Լҫ��A�䤤�ƥ��A�Ⱦ����n�D�q�ƥ��Ȥ���W�A�w���A�W�L�w����ssh�s���C
The steps are as follows:�B�J�p�U�G
1. 1 �C Create a account on the backup server just for backup purposes.�Ыؤ@�ӱb��A�ƥ��A�Ⱦ��u�O���F�ƥ����ت��C I named mine backup. i�R�W���ƹp�ƥ��C The account password should be disabled.�b��K�X�A���T�ΡC For example you might have the following entries in your passwd/shadow files:�Ҧp�A�z�i��H�U�����ɧ@�~�b�z���K�X/���v�ɮסG
/etc/passwd�b/ etc /�K�X
backup:x:99:99:backup:/backup:/bin/false�ƥ��G x �G 99:99 �G�ƥ��G /�ƥ��G /�y/�갲
/etc/shadow�b/ etc /���v
backup:!!:12644:0:99999:7:::�ƥ��G �I �G 12644:0:99999:7 �G �G �G
A simple way is to create the account using useradd.�@��²�檺��k�O�n�Ыرb��ϥ�useradd �C
2. 2 �C Setup�w�� ssh to allow you to login without password ssh����z�S���n��K�X from your backup server (backup account) to client machines which you want to backup.�q�z���ƥ��A�Ⱦ��]�ƥ��b��^��Τ�ݾ����A�z�n�ƥ��C
3. 3 �C Install rdiff-backup on your backup machine as well as on all the client machines�w��rdiff�ƥ��z���ƥξ��A�H�ά��Ҧ��Ȥ�ݾ���
3. 3 �C Create an ssh config alias, for each client machine, which defines how to contact client with the backup key.�Ыؤ@��SSH���t�m�O�W�A�C�ӫȤ�ݪ������A���w�q�F�p���pô�Ȥ�ݻP�ƥ�������C Place the following, per client machine, into /backup/.ssh/config:�a��H�U�A�C�Ȥ���W�A��/�ƥ�/ .ssh /�t�m�G
host client1-backup �F�D��client1�ƥ�
hostname client1 �D��client1
user root ���
identityfile /backup/.ssh/id_rsa identityfile /�ƥ�/ .ssh / id_rsa
compression yes ���Y�O
protocol 2 ij�w��2
4. 4 �C Perform a test backup�����ժ��ƥ�
rdiff-backup client1-backup::/tmp client1-backup rdiff�ƥ�client1�ƥ��G �G / tmp��client1�ƥ�
5. 5 �C Setup cron job for unattended daily backup�w�˧@�~�A���L�H�Ȧu�C��ƥ�
There is much more you can do to further customize the process.���ܤj���V�h�A�z�i�H���i�@�B�۩w�q���L�{�C However the steps above should get you started.���L�A�W�z�B�J����z���P�W���C
Filed under���_�U Computer Security�p����w�� , �A Fedora Core 6�OFedora Core 6 , �A Headline News�Y��s�D , �A How To�p�� , �A Linux Linux�� , �A Linux Migration Linux�E�� , �A Open Source Software�}�X�n�� , �A Tech Note�N���� , �A Web Hosting�����D�� , �A Web Services Web�A�� | |
| |
RSS 2.0 2.0 | |
Trackback Trackback��踪 this Article |���峹|
Email this Article�q�l�l�峹
You may also like to read�z�]�i�H�QŪ |




































