Hello all,
I use dump utility for backup my filer on the tape device, that is attached to the filer. Here is the dump command:
rsh netapp dump 0dsbfu 54000 52000 64 nrst0a /vol/vol0/home
Now I need to restore single file: /vol/vol0/home/software/user/file. I understood from netapp guy, that it's inpossible. My question is how I can restore at least parent directory for this file /vol/vol0/home/software/user. Is it possible? If I run this command (it's the fifth record):
netapp> restore xvfbs rst0a 64 5 /vol/vol0/home/software/user/file
it ignores the last argument and tries to restore whole the record /vol/vol0/home. And if I add "D" options, like :
netapp> restore xvfbsD rst0a 64 5 rst0a /vol/vol0/home/software/user/file /vol/vol0/home/software/user/tmp
I get error message "/vol/vol0/home/software/user/tmp is not on tape".
It should be very simple, but netapp support guy said me, that -s 5 and -b 64 options are eligible and advised to use the following format ( I guess it's from now.netapp.com):
restore xvfD rst0a /vol/vol0/home/software/user/tmp /vol/vol0/home/software/user/file , that of course didn't work.
Any help will be very appreciate.
Thanks.
~*-,._.,-*~`^`~*-,._.,-*~`^`~*-,._.,-*~`^`~*-,._.,-*~`^`~*-,._. Artur Shnayder Voice: (609)655-5105 x12 System Manager Fax: (609)655-5114 Email: artur@cgen.com Compugen Inc URL: http://www.cgen.com ~*-,._.,-*~`^`~*-,._.,-*~`^`~*-,._.,-*~`^`~*-,._.,-*~`^`~*-,._.
Hello all,
I use dump utility for backup my filer on the tape device, that is attached to the filer. Here is the dump command:
rsh netapp dump 0dsbfu 54000 52000 64 nrst0a /vol/vol0/home
Now I need to restore single file: /vol/vol0/home/software/user/file. I understood from netapp guy, that it's inpossible. My question is how I can restore at least parent directory for this file /vol/vol0/home/software/user. Is it possible? If I run this command (it's the fifth record):
netapp> restore xvfbs rst0a 64 5 /vol/vol0/home/software/user/file
it ignores the last argument and tries to restore whole the record /vol/vol0/home. And if I add "D" options, like :
netapp> restore xvfbsD rst0a 64 5 rst0a /vol/vol0/home/software/user/file /vol/vol0/home/software/user/tmp
I get error message "/vol/vol0/home/software/user/tmp is not on tape".
It should be very simple, but netapp support guy said me, that -s 5 and -b 64 options are eligible and advised to use the following format ( I guess it's from now.netapp.com):
restore xvfD rst0a /vol/vol0/home/software/user/tmp /vol/vol0/home/software/user/file , that of course didn't work.
Artur,
I think I can help.
First, you _can_ restore a single-file from a NetApp dump tape. You can also restore a subtree.
Second, you can restore the file/subtree to the place where you dumped it, or somewhere else entirely, if you so desire. I generally restore the file somewhere else, as a staging area, then move it to where I want it. It makes me feel safer - and since I'm specifying EXACTLY where it is going, I'm never surprised.
Third, the problem is that you should not include the path you dumped when requesting the file to be restored (that is, you should have asked for /software/user/file, instead of /vol/vol0/home/software/user/file because the /vol/vol0/home is assumed on the tape. )
You want your command to be: netapp> restore xvfbsD rst0a 64 5 /vol/vol0/home/restore_dir /software/user/file
and you will end up with your file at: /vol/vol0/home/restore_dir/software/user/file
There is no way to avoid creating the directories in the path to the file/directory you want (in Artur's case he will always get a ./software/user/file path created by restore)
Let me break down what is happening, for those who are interested. (I've been watching the NBA Finals, so I've got to over-analyze everything...)
restore (obvious) x - extract a single file or a subtree. This works on level 0 or incremental dump tapes. However, if you ever do a disaster recovery restore (i.e. you are restoring the entire backup image), I recommend the 'r' option, since that will make the file system look exactly as it did when you did the final incremental backup (this is how NDMPcopy incrementals work). The 'r' option will restore a full backup faster than the 'x' option. Finally, as of Ontap 5.3, you can restart 'r' restores, via the 'R' option. Consult you manual for more information about this.
v - verbose. Turns on a lot of extra printouts. While they help you see what is happening, the overhead can cut restore performance in HALF! Obviously, not recommended for disaster recovery restores... :) It also can cause a CPU jump of about 25 - 30%...
f - input file (in this case the tape drive rst0a)
b - tape record size in KB (in this case 64). NetApp's default is 63 KB, but we support up to 64KB.
s - skip tape file (in this case to 5). Useful if you have multiple dumps on one tape, and you know the one you want to use
D - The directory into which to restore the data (in this case /vol/vol0/home/restore_dir) If you don't use the 'D' option, then it will put the data into the path you dumped (in this case /vol/vol0/home)
[subtrees/files to extract] - This is always the last argument to a restore. For the restore 'r', it ignores this argument, since it restores the entire backup. Anyway, you can specify a number of files/subtrees to restore, as long as they are separated by a space on the command line. If you don't specify anything, it restores the whole tape. THE PROBLEM -- you need to specify the file you want to restore, with respect to the path on the tape. Therefore, if you dumped /vol/vol0/home, then you DO NOT want /vol/vol0/home in the "subtrees/files to extract" path.
A couple of examples, just for fun:
Let's say Artur had dumped /vol/vol0, then his restore command would be netapp> restore xvfbsD rst0a 64 5 /vol/vol0/restore_dir /home/software/user/file and the file would end up at: /vol/vol0/restore_dir/home/software/user/file
Let's say Artur dumped /vol/vol0/home, but he wanted two subdirectories: netapp> restore xvfbsD rst0a 64 5 /vol/vol0/home/restore_dir /software/user /software/build and he would end up with: /vol/vol0/home/restore_dir/software/user /vol/vol0/home/restore_dir/software/build
Let's say Artur REALLY, REALLY wants his file to be restored "in-place" netapp> restore xvfbs rst0a 64 5 /software/user/file and he would have: /vol/vol0/home/software/user/file
Let's say Artur had level 0 and level 1 dump tapes, and he wanted to do a (fire-drill) disaster recovery (knock-on-wood). ;) netapp> restore rfbsD rst0a 64 5 /vol/vol0/home_recov
The he pops in the level 1 tape in drive rst1a (it's tape file 1 on tape rst1a) netapp> restore rfbD rst1a 64 /vol/vol0/home_recov
And he would end up with the EXACTLY the contents of /vol/vol0/home (as of the level 1 dump), in /vol/vol0/home_recov
Hopefully this helps things a little bit. For those of you with NDMP solutions, your NDMP client handles all of these things automatically.
Stephen Manley Data Availability and Management's Marv Albert ;)
Stephen,
Thank you very much, you got the point. Source directory (or file) should be written with incremental path and not absolute one. In my case the following command works:
netapp> restore xvfbsD rst0a 64 5 rst0a /vol/vol0/home/software/user/tmp /software/user/file
Quoting Stephen Manley stephen@netapp.com:
Hello all,
I use dump utility for backup my filer on the tape device, that is
attached to
the filer. Here is the dump command:
rsh netapp dump 0dsbfu 54000 52000 64 nrst0a /vol/vol0/home
Now I need to restore single file: /vol/vol0/home/software/user/file. I understood from netapp guy, that it's inpossible. My question is
how I can
restore at least parent directory for this file
/vol/vol0/home/software/user.
Is it possible? If I run this command (it's the fifth record):
netapp> restore xvfbs rst0a 64 5
/vol/vol0/home/software/user/file
it ignores the last argument and tries to restore whole the record /vol/vol0/home. And if I add "D" options, like :
netapp> restore xvfbsD rst0a 64 5 rst0a
/vol/vol0/home/software/user/file
/vol/vol0/home/software/user/tmp
I get error message "/vol/vol0/home/software/user/tmp is not on
tape".
It should be very simple, but netapp support guy said me, that -s 5
and -b 64
options are eligible and advised to use the following format ( I guess
it's from
now.netapp.com):
restore xvfD rst0a /vol/vol0/home/software/user/tmp /vol/vol0/home/software/user/file , that of course didn't work.
Artur,
I think I can help.
First, you _can_ restore a single-file from a NetApp dump tape. You can also restore a subtree.
Second, you can restore the file/subtree to the place where you dumped it, or somewhere else entirely, if you so desire. I generally restore the file somewhere else, as a staging area, then move it to where I want it. It makes me feel safer - and since I'm specifying EXACTLY where it is going, I'm never surprised.
Third, the problem is that you should not include the path you dumped when requesting the file to be restored (that is, you should have asked for /software/user/file, instead of /vol/vol0/home/software/user/file because the /vol/vol0/home is assumed on the tape. )
You want your command to be: netapp> restore xvfbsD rst0a 64 5 /vol/vol0/home/restore_dir /software/user/file
and you will end up with your file at: /vol/vol0/home/restore_dir/software/user/file
There is no way to avoid creating the directories in the path to the file/directory you want (in Artur's case he will always get a ./software/user/file path created by restore)
Let me break down what is happening, for those who are interested. (I've been watching the NBA Finals, so I've got to over-analyze everything...)
restore (obvious) x - extract a single file or a subtree. This works on level 0 or incremental dump tapes. However, if you ever do a disaster recovery restore (i.e. you are restoring the entire backup image), I recommend the 'r' option, since that will make the file system look exactly as it did when you did the final incremental backup (this is how NDMPcopy incrementals work). The 'r' option will restore a full backup faster than the 'x' option. Finally, as of Ontap 5.3, you can restart 'r' restores, via the 'R' option. Consult you manual for more information about this.
v - verbose. Turns on a lot of extra printouts. While they help you see what is happening, the overhead can cut restore performance in HALF! Obviously, not recommended for disaster recovery restores... :) It also can cause a CPU jump of about 25 - 30%...
f - input file (in this case the tape drive rst0a)
b - tape record size in KB (in this case 64). NetApp's default is 63 KB, but we support up to 64KB.
s - skip tape file (in this case to 5). Useful if you have multiple dumps on one tape, and you know the one you want to use
D - The directory into which to restore the data (in this case /vol/vol0/home/restore_dir) If you don't use the 'D' option, then it will put the data into the path you dumped (in this case /vol/vol0/home)
[subtrees/files to extract] - This is always the last argument to a restore. For the restore 'r', it ignores this argument, since it restores the entire backup. Anyway, you can specify a number of files/subtrees to restore, as long as they are separated by a space on the command line. If you don't specify anything, it restores the whole tape. THE PROBLEM -- you need to specify the file you want to restore, with respect to the path on the tape. Therefore, if you dumped /vol/vol0/home, then you DO NOT want /vol/vol0/home in the "subtrees/files to extract" path.
A couple of examples, just for fun:
Let's say Artur had dumped /vol/vol0, then his restore command would be netapp> restore xvfbsD rst0a 64 5 /vol/vol0/restore_dir /home/software/user/file and the file would end up at: /vol/vol0/restore_dir/home/software/user/file
Let's say Artur dumped /vol/vol0/home, but he wanted two subdirectories: netapp> restore xvfbsD rst0a 64 5 /vol/vol0/home/restore_dir /software/user /software/build and he would end up with: /vol/vol0/home/restore_dir/software/user /vol/vol0/home/restore_dir/software/build
Let's say Artur REALLY, REALLY wants his file to be restored "in-place" netapp> restore xvfbs rst0a 64 5 /software/user/file and he would have: /vol/vol0/home/software/user/file
Let's say Artur had level 0 and level 1 dump tapes, and he wanted to do a (fire-drill) disaster recovery (knock-on-wood). ;) netapp> restore rfbsD rst0a 64 5 /vol/vol0/home_recov
The he pops in the level 1 tape in drive rst1a (it's tape file 1 on tape rst1a) netapp> restore rfbD rst1a 64 /vol/vol0/home_recov
And he would end up with the EXACTLY the contents of /vol/vol0/home (as of the level 1 dump), in /vol/vol0/home_recov
Hopefully this helps things a little bit. For those of you with NDMP solutions, your NDMP client handles all of these things automatically.
Stephen Manley Data Availability and Management's Marv Albert ;)
~*-,._.,-*~`^`~*-,._.,-*~`^`~*-,._.,-*~`^`~*-,._.,-*~`^`~*-,._. Artur Shnayder Voice: (609)655-5105 x12 System Manager Fax: (609)655-5114 Email: artur@cgen.com Compugen Inc URL: http://www.cgen.com ~*-,._.,-*~`^`~*-,._.,-*~`^`~*-,._.,-*~`^`~*-,._.,-*~`^`~*-,._.