Date: Fri, 20 Jan 2006 13:28:05 +0700 (ICT) From: Olivier Nicole To: dipak@banyan.cs.ait.ac.th, on@banyan.cs.ait.ac.th Subject: Things done around amanda Dipak, OK, this is a summary of what was done around amanda server. The / partition on amanda server was corrupted. 1) boot the machine with the distribution CD rom 2) choose fixit and go on with distribution CD number 2 3) clean the file systems. The device directory is in /dist/dev, so you run "fsck /dist/dev/da0s1a", etc. of course you must find the correct device for each partition. 4) once the file system are clean, you can mount them. Mount /usr from the disk to /usr: "mount /dist/dev/da2s1f /usr" with the appropiate device. By mounting usr, you then have all the amanda tools accessible. 5) rebuild a new file system for /: "newfs /dist/dev/da0s1a" 6) find the correct tape that holds the back up of amanda root partition. You can find that from Amand email that are called AMANDA DATABASE INFO: host: amanda disk: / command: 0 last_level: 0 consecutive_runs: 41 full-rate: 189.000000 239.000000 899.000000 full-comp: 0.703242 0.703792 0.703879 incr-rate: -1.000000 -1.000000 -1.000000 incr-comp: -1.000000 -1.000000 -1.000000 stats: 0 243080 170944 900 1137695658 16 CSIM-set-3-02 ^^^^^^^^^^^^^ The full back up (level 0) was made on tape CSIM-set-3-02, mount that tape. 7) rewind the tape "mt rew" 8) go to a directory with some enough space available 9) extract what the image of the back up: amrestore /dist/dev/nsa0 amanda You will get a file with a name of the form amanda._.20051220.0 where 20051220 is the date of the backup and the last 0 means level 0 back up. You may also get other files, for example amanda._usr.20051220.0 which is the backup of the partition /usr. 10) mount the newly create filesystem da0s1a: mount /dist/dev/da1s1a /mnt 11) go to /mnt: "cd /mnt" 12) extract the files from the image of the back up: gtar --numeric-owner -xpGvf /path_to/amanda._.20051220.0 13) remove the CD and reboot -------------- You receive one new email every day, with subject AMANDA DATABASE INFO. This email has three parts: - first part is a copy of the tapelist /usr/local/etc/amanda/tapelist It is important to save the tapelist after every run, so in case of restoring, the sequence of tapes is preserved. - second part is the report of rsync of the database files from Amanda. Database files hold information like what was saved on what tape every day. It is important to keep a back-up of the database. The data are on amanda:/var/amanda/ and amanda:/usr/local/etc/amanda and they are rsync'ed to database:/database/amanda after the back-up has completed. Rsync runs on the gigabit network only. - thrid part is the result of "amadmin export", you can use the equivalent import command to rebuild the database, and the file is also human readable. -------------- This email is inspired from http://wiki.zmanda.com/index.php/Restoring_files Olivier