X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=input%2Fhowto%2Fbackup.creole;h=e0cc1d1db6942e02162c20d71a7cba4f9a41105f;hb=3982b5accd2c461cf8327bf1cc2affd09e0b1455;hp=a5ff119d801cc0b8245fd94c0bbcfc4021e7bfac;hpb=26974ecb6fec14368f0b7cfe88e1dadfea2d40e5;p=mirror%2Fdsa-wiki.git diff --git a/input/howto/backup.creole b/input/howto/backup.creole index a5ff119..e0cc1d1 100644 --- a/input/howto/backup.creole +++ b/input/howto/backup.creole @@ -1,6 +1,6 @@ = Debian backup = -bartok.debian.org alias backup.debian.org is Debian's backup machine. +backuphost.debian.org alias backup.debian.org is Debian's backup machine. == Backup organisation == @@ -41,42 +41,26 @@ Directories: * install da-backup on the client * create a crontab that runs da-backup daily at some convenient time * configure the directories in {{{/etc/da-backup}}} -* create a new SSH key pair for each configuration file foo in - {{{/etc/da-backup/}}} with {{{ssh-keygen -t rsa -f /root/.ssh/da_foo"}}}: - -{{{ - cd /etc/da-backup && - [ -r /root/.ssh ] && - for i in *; do - echo $i && - if [ -e "/root/.ssh/da_$i" ]; then continue; fi && - sudo ssh-keygen -t rsa -f /root/.ssh/da_$i -N '' -C "da-backup for $i on `hostname -f`"; - done - - echo "#" && - echo "# `hostname -f`" && - echo "#" && - myip=`host $(hostname -f) | \ - grep has\ address | \ - sed -e 's/.*address //'` && - cd /etc/da-backup && - for i in *; do - echo "command=\"rsync --server -vlHogDtprz --delete --delete-after --ignore-errors . /org/backup.debian.org/staging/`hostname -f`/$i\",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,from=\"::ffff:$myip,$myip\" `cat /root/.ssh/da_$i.pub`" - done && echo -}}} - -* (why is this here? It shouldn't be necessary, --weasel) ((run {{{ssh -o 'StrictHostKeyChecking no' backup.debian.org}}} and abort))) -* install the public components of the key with the proper command in - {{{/root/.ssh/authorized_keys}}} on bartok, start a new section for each host. * configure how many copies of the directory should be kept in - {{{/etc/da-backup-manager/}}} -* mkdir the target directories + backuphost's {{{/etc/da-backup-manager/}}} * run {{{da-backup -v}}} on the client to see if it all works. -* Backup items should either be called {{{/}}} or - {{{services/}}}, i.e. always use a two-level directory layout. +* Backup items should be called {{{/}}}. + Historically we also used {{{services/}}}. == Consistency checks == * Run {{{sudo -u nagios /usr/lib/nagios/plugins/dsa-check-dabackup-server}}} + +== Restoring specific files == + +* Login to the bacula director {{{dinis.debian.org}}} +* run {{{sudo bconsole}}} +* Use the {{{restore}}} command +* Choose "find the job ids of the most recent backup for a client" (9) +* Choose the server +* Choose "enter a list of directories to restore for found job ids" (11) +* Login to the server +* Look at the files in {{{/var/tmp/bacula-restores/}}} +* Clean up the files in {{{/var/tmp/bacula-restores/}}}