Хаклаб/Backup

Од Сподели wiki
Прејди на: содржини, барај

Backup на slobodensoftver.org.mk

slobodensoftver.org.mk и некои други сајтови работат на vps. Backup се прави на brok.local во Хаклаб еднаш дневно.

Во cron на серверот треба да има:

12 04 * * * /usr/bin/rdiff-backup --exclude-other-filesystems / /mnt/80giga/slobodensoftver.vpsfree.cz/ 2>&1 > /var/log/rdiff-backup.log
12 10 * * * /usr/bin/rdiff-backup --force --remove-older-than 1M backup2cmk@brok::/mnt/80giga/slobodensoftver.vpsfree.cz/

Backup na dvoarak.local

root@dvoarak се врзува секој понеделник на brok.local и прави rdiff-backup во /mnt/80giga/dvoarak.local

   12 05 * * 1 rdiff-backup  /root/ backup2cmk@brok::/mnt/80giga/dvoarak.local/root/
   24 05 * * 1 rdiff-backup /home/ backup2cmk@brok::/mnt/80giga/dvoarak.local/home/
   36 05 * * 1 rdiff-backup /etc/ backup2cmk@brok::/mnt/80giga/dvoarak.local/etc/
   48 05 * * 1 rdiff-backup /var/lib/pacman/local/ backup2cmk@brok::/mnt/80giga/dvoarak.local/var_lib_pacman_local/
   00 06 * * 1 rdiff-backup /var/spool/cron/ backup2cmk@brok::/mnt/80giga/dvoarak.local/var_spool_cron/

SSH/authorized

Во backup2cmk@brok:/.ssh/authorized_keys да може да прави само rdiff-backup работи.

   command="rdiff-backup --server",no-pty,no-agent-forwarding,no-port-forwarding,no-X11-forwarding ssh-rsa AAAAB3Nza....

Backup maintenance

Да излисташ инкрементите:

   rdiff-backup -l backup2cmk@brok::/mnt/80giga/dvoarak.local/etc/

Да ги избришеш постарите од 1 месец:

   rdiff-backup --force --remove-older-than 1M backup2cmk@brok::/mnt/80giga/dvoarak.local/root/