Restoring to a different location
I recently returned from a vacation to discover that a database app had decided to do strange things about a week and a half ago. There was no damage to the data (just a bunch of spurious reports printed), but the app's vendor would like to see what the database looked like before this happened. There is no concern that the active database may have been damaged. Now, I know how to use amrecover to restore the files to their original location, but overwriting the active database would be Very Bad, so how do I restore them to a different location? (I doubt that it matters, but, just in case, the database directory is on a Windows machine which is backed up by a Linux client via samba.)
Re: Restoring to a different location
On Wed, Jul 09, 2003 at 11:59:47AM -0500, Dave Sherohman wrote: I recently returned from a vacation to discover that a database app had decided to do strange things about a week and a half ago. There was no damage to the data (just a bunch of spurious reports printed), but the app's vendor would like to see what the database looked like before this happened. There is no concern that the active database may have been damaged. Now, I know how to use amrecover to restore the files to their original location, but overwriting the active database would be Very Bad, so how do I restore them to a different location? (I doubt that it matters, but, just in case, the database directory is on a Windows machine which is backed up by a Linux client via samba.) Whenever I've run amrecover I've done it from an empty directory created just for the recovery. When you do the extraction and it says what tapes it needs, it also says into which directory it will recover. In my case it is always the directory I'm in. Subdirectories are created as needed. So if I recover with a current directory of /tmp/recov, and the disk is /var, and the files I'm extracting were from /var/adm, then a directory /tmp/recov/adm is created. -- Jon H. LaBadie [EMAIL PROTECTED] JG Computing 4455 Province Line Road(609) 252-0159 Princeton, NJ 08540-4322 (609) 683-7220 (fax)
Re: Restoring to a different location
On Wed, 9 Jul 2003 at 11:59am, Dave Sherohman wrote I recently returned from a vacation to discover that a database app had decided to do strange things about a week and a half ago. There was no damage to the data (just a bunch of spurious reports printed), but the app's vendor would like to see what the database looked like before this happened. There is no concern that the active database may have been damaged. Now, I know how to use amrecover to restore the files to their original location, but overwriting the active database would be Very Bad, so how do I restore them to a different location? (I doubt that it matters, but, just in case, the database directory is on a Windows machine which is backed up by a Linux client via samba.) Just be somewhere else (in the fs, that is) when you fire up amrecover. amrecover restores to the $CWD. Alternatively, just amrestore the image off the tape and manually 'tar x' what you need. -- Joshua Baker-LePain Department of Biomedical Engineering Duke University
Re: Restoring to a different location
Now, I know how to use amrecover to restore the files to their original location, but overwriting the active database would be Very Bad, so how do I restore them to a different location? Usually I do this by just making sure that, when starting amrecover, I'm NOT at the root of the filesystem where the original file(s) were backed up from. For example, if I want to restore /var/db/mysql/somedatabase/sometable.* to an alternate location, I just cd to /home/toomas, run amrecover from there and the files get restored as /home/toomas/var/db/mysql/somedatabase/sometable.*. Amrecover even warns you that you're not at the root of correct filesystem, but in this case that's exactly what you want. (I doubt that it matters, but, just in case, the database directory is on a Windows machine which is backed up by a Linux client via samba.) Uh oh. I've never had to use Amanda + Samba, so I'm not sure if any of above is applicable to this situation. Maybe you can smbmount (does such a term exist?) some other share on the Windows machine on the Linux client, cd to there and then run amrecover. -- Toomas Aas | [EMAIL PROTECTED] | http://www.raad.tartu.ee/~toomas/ * Everyone has a photographic memory. Some don't have film.
Re: Restoring to a different location
On Wed, Jul 09, 2003 at 08:43:57PM +0300, Toomas Aas wrote: Amrecover even warns you that you're not at the root of correct filesystem, but in this case that's exactly what you want. Cool. Sounds easy enough. I guess I must have assumed at some point that the warning was a hard error instead of just a warning. (I doubt that it matters, but, just in case, the database directory is on a Windows machine which is backed up by a Linux client via samba.) Uh oh. I've never had to use Amanda + Samba, so I'm not sure if any of above is applicable to this situation. Nah. It doesn't need to be restored onto the Winbox, just to someplace that I can mail it from. (Which, actually, disqualifies the Winbox.) Maybe you can smbmount (does such a term exist?) Yep, there's an smbmount out there, as well as 'mount -t smbfs'. Thanks, everyone!