On Thu, 2015-05-07 at 20:29 +0000, Debra S Baddorf wrote:
> Guess I wouldn’t have tried it sitting in /. I probably would have created
> a new empty directory …. and named it
> /newvar. Then I’d be sitting in /newvar, and tried to restore /var.
> And I would get
> /newvar/var probably. Not necesarily.
>
If you restore /var in /newvar, you should get everything beneath /var
restored in /newvar (not /newvar/var).
> But that’s okay, I know how to do THAT kind of fix.
> And I usually am restoring things at a much lower level. Like
> /var/one/two/three/four
>
> so I’ve created a new empty “fourA” perhaps.
> And I get /var/one/two/three/fourA/one/two/three/four
This is because you are restoring file ./one/two/three/four from a
backup of /var (not a backup of /var/one/two/thee). Thus, the original
path, "one/two/three", gets restored along with the file in whatever
directory you are sitting in at the time.
If you want to restore file /var/one/two/three/four from a backup
of /var in place, you would be in the directory you are backing up and
then restore the file (possibly after moving the original if still there
otherwise it will be overwritten with the restored file), as in:
cd /var
mv one/two/three/four one/two/three/four-orig
amrecover # select and restore file "one/two/three/four"
Now file one/two/three/four is restored in place
to /var/one/two/three/four
Paul