cancel
Showing results for 
Search instead for 
Did you mean: 

Redirected restore of Mounted filsystems under Windows

Fraser73
Level 3

I am attempting to carry out a number of re-directed restores from Windows boxes onto different hardware. This is in order that some work can be carried out offline on the backed up data. These are automated restores using scripted bprestore, rather than the gui.

When recovering a filesystem which hosts other mounted filesystems in mount point directories (and the backup crossed those mount points), NetBackup creates the NTFS filesystem junction object (reparse point) and then fails with an error 5, because there is no filesystem to be mounted in this mount point. This is all well and good and I understand why this is the case, irritating as it is for my particular situation.

What I have noticed is that if I pre-create any of the mount point directories and then do the restore, I get a failed to restore type error for each of the mount points, but the subsequent data inside the mount points is restored. I therefore have two questions:

1) Can bprestore be made to create a directory if it comes across a mount point (reparse point)

2) If 1 is not possible: How can I identify the mount points in a restore prior to recovery, in order that I can pre-create the required folders?

2 REPLIES 2

Will_Restore
Level 6

so I am curious about this as well.

 

Fraser73
Level 3

Ok, I've got a quick and dirty solution, which I'm not entirely happy with, but it basically does the job. The solution is to create all of the directories manually (ok, with a script) and then run the restore over the top of the empty file system tree. Here is an overview of what my script does, in case anyone finds it useful:

 

bplist -S <servername> -C <clientname> -R -t 13 -s <start date> -e <end date> -l "/?/" > output1.txt

(-t 13 = filetype for Windows/NTFS, "/?/" is for Windows filesystem mounted in a drive:)

 

for /f "delims=r,w,x tokens=1,*" %a in (output1.txt) do if %a==d echo %b >> output2.txt

(Check if the first letter is "d" indicating a directory)

 

for /f "tokens=1,2,3,4,5,6,7,* delims= " %a in (output2.txt) do echo %h >> output3.txt

for /f "delims=: tokens=1,*" in (output3.txt) do echo "x:\%%a%%b" >> output4.txt

for /f "tokens=*" %a in (output4.txt) do md %a

 

This is simplified, step by step, you'll notice that the directories are created on x: which is where I would be making the restore.

It would be nice to have a restore script equivilant of the backup "follow mount points", which is something along the lines of "Restore directories, not mount points." for restoring onto different hardware or into a different location.