Amanda-Users

Re: amrestore with tar empty directories at mountpoints

2006-09-25 09:32:52
Subject: Re: amrestore with tar empty directories at mountpoints
From: Nick Brockner <nbrockne AT hamilton DOT edu>
To: amanda-users AT amanda DOT org
Date: Mon, 25 Sep 2006 08:18:22 -0400
Jon LaBadie wrote:
On Sun, Sep 24, 2006 at 02:23:56PM -0400, Nick Brockner wrote:
Hi All.

I am new to amanda, and maybe I just don't understand how it works, but here is my problem:

I have a remote machine that I back up over my network. The backups and everything go fine. I am doing a disaster recovery test today, and it went all wrong. Very, very wrong. I have a DLE in disklists for "/" of this remote host. The problem is that on this host, I have several different partitions mounted at /usr, /var/ /home, . . . you get the idea, and when the backup of the "/" DLE happenes, empty directories are created for all the mountpoints! (I am using GNUTAR). So, when I tried to do a bare-metal restore, it clobbered my base install by overwriting all the mountpoints with empty directories, and I couldn't restore the rest of the partitions because the base install was hosed.

Can anyone help me / tell me what to do in order to get tar not to create these empty directories at the other mountpoints?

When I think of bare-metal restoration, I think of going to an empty,
probably partitioned and formatted drive.  In that case, restoring
the root DLE followed by the /usr, /var, ... DLEs would achieve what
you seek.

When the backup of your root DLE was made, /usr, as a mountpoint, was
an empty directory in the root file system.  So that is what was
restored.


amrecover restores to the state as of a particular time/date.
If I ask to recover a single directory from a week ago,
and I do the recovery into the original directory, any files
created during the week are deleted because it is restoring
the state of the directory to that of a week ago.  Same with
ownership and permission changes I might have made during the
week.  For this reason it is oft said here, do not do amrecover
into the original location, but instead into an empty directory.
Then check the files and move/copy to the ultimate location.

I don't know if you had used exclude directives to eliminate
the mountpoints from the root DLE would have changed anything.
Perhaps if they were not even included in the backup, they might
be totally eliminated upon recovery rather than left as empty
directories.  I just don't know.

Jon,

Thanks. I now realize I was going about the restore all wrong. In the end, working down from the top-level directory and then restoring all mountpoints below worked perfectly. I guess I was expecting a dump/restore type of restoration, where the mountpoints wouldn't show up as empty dirs and therefore would not be overwritten during the actual restoration. I had done a bare minimal install before doing the restore of the filesystems so that the MBR was happy.

Amanda rocks.

Thanks again,
Nick Brockner




<Prev in Thread] Current Thread [Next in Thread>