Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Hey, If you backup a linux server using the dump command is there a way to check if the dump was actually succesful apart from witnessing the files have been created and are an appropriate size?

share|improve this question
add comment

2 Answers 2

Some suggestions:

  1. Check the exit code from the dump program.
  2. Do a test restore of a single known file from the file system in question.
  3. As above but from a randomly chosen file.
  4. As above but a file known to have changed recently.
  5. If you are dumping to tape make sure that the tape contains the number of filesystem's you backed up (lots of people find out about the rewind device works here).
  6. restore the dump to /dev/null, check that worked ok.
  7. Look at some of the flags dump takes. -u to update /var/lib/dumpdates, -F to run a script at the end of the dump, -I to tune error tolerance might be helpful to you.

All the above are going to depend on how much time you have to do the dump, how big and how many the FS'es are etc.

Remember: It's not backed up until it's been restored and tested (in front of your manager!).

share|improve this answer
    
To check the exit code in a script you can use the $? variable: /sbin/dump ... if ( $? != "0" ) then #backup failed –  einstiien Jan 21 '10 at 15:03
    
An additional check is to mail the output of the dump(8) command, which should happen automatically if dump(8) is run from a crontab (and assuming the system is able to send emails). –  Bram Schoenmakers Jul 7 '10 at 7:37
add comment

you could use checksums. but the safest way is to restore from your backup. you do not have to test every backup, but once in a wile you should restore a backup on a different machine. this way you will know for sure whether your backup works or not.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.