Next | Prev | Up | Top | Contents | Index

Restoring the Wrong Backup

If you accidentally restore the wrong backup, you should rebuild the system from backups. Unless you are very sure of what you are doing, you should not simply restore the correct backup version over the incorrect version. This is because the incorrect backup may have altered files that the correct backup won't restore.

In the worst possible case, you may have to reinstall the system, then apply backups to bring it to the desired state. Here are some basic steps to recovering a filesystem.

If you used incremental backups, such as from backup or bru:

  1. Make a complete backup of the current state of the filesystem. If you successfully recover the filesystem, you will not need this particular backup. But if there is a problem, you may need to return to the current, though undesirable, state.

  2. Start with the first complete backup of the filesystem that was made prior to the backup that you want to have when you're finished. Restore this complete backup.

  3. Apply the series of incremental backups until you reach the desired (correct) backup.
If you accidentally restored the wrong file-oriented backup (such as a tar or cpio archive):

  1. Make a complete backup of the affected filesystem or directory hierarchy. You may need this not only as protection against an unforeseen problem, but to fill any gaps in your backups.

  2. Bring the system to the condition it was in just before you applied the wrong backup.

    If you use an incremental backup scheme, follow steps 2 and 3 above (recovering from the wrong incremental backup).

    If you use only utilities such as tar and cpio for backups, use what backups you have to get the system to the desired state.

  3. Once the system is as close as possible to the correct state, restore the correct backup. You are finished. If the system is in the desired state, skip the remaining steps.

    If you cannot bring the system to the state it was in just before you applied the wrong backup, continue with the next series of steps.

  4. If you cannot manage to bring the system to the correct state (where it was just before you restored the wrong backup), get it as close as possible.

  5. Make a backup of this interim state.

  6. Compare the current interim state with the backup you made at the outset of this process (with the incorrect backup applied) and with the backup you wish to restore. Note which files changed, which were added and removed, and which files remain unchanged in the process of bringing the system to the desired state.

    Using these notes, manually extract the correct versions of the files from the various tapes.



Next | Prev | Up | Top | Contents | Index