CLI option for "Restore directories without crossing mount points" using bprestore command
Hi Experts,
Would like to know if we have any option for the "Restore directories without crossing mount points" using bprestore command while restoring to a client.
I have tried looking at the man page, but it doesn't say anything about this option.
Is this a limitation when restore is done from command line or something else?
Regards,
Arun
In your second example, how each file system was backed up has a direct effect on how it is restored.
If the file systems "/data" and "/data/filesystem1" were backed up as a single backup stream and the option to not cross mount points was not specified, then you will need to explicitly exclude the second file system. Any files that you specify must be listed at the end of the command line after all other options. You must use absolute file paths. You can also use the "-f filelist" option to specify the restore files. The use of the exclamation point at the start of the full path indicates it is to be excluded. If 'do not cross mount points' was specified, then the /data and the /data/filesystem1 file system mount points will each be their own data streams. If not specified, the /data/filesystem1 mount point will get backed up twice, once under /data and the second time as /data/filesystem1.
By default, the original file paths will be used for the restore. Unless specified otherwise (using the -K option), they will overwrite existing files that match the full path. To redirect the files to an alternate path, you must specify a rename file and use the "-R rename_file" option. Use the following form for entries in the rename file:
change backup_filepath to restore_filepath
The file paths specified must start with / (slash)
So what does that mean to you? Let's assume that the /data backup files are to be restored under the /filesystem3 mount point. The 'bprestore' CLI invocation would read:
bprestore -R my_rename_file -f my_filelist
The contents of my_rename_file would be:
change /data to /filesystem3/data
The contents of my_filelist would be:
/data
!/data/filesystem1You can skip the -f option and use this format:
bprestore -R my_rename_file /data !/data/filesystem1
Personally, I would make use of the -R and the -f options which are straight forward and simple.
All of this can be found in the NetBackup 7.X Commands Reference Guide.
And imporatant to note, restoring the root (/) filesystem over itself on a running Unix/Linux server will cause the running client to kernel panic and crash rather swiftly. That's where use of the BMR recovery comes in. Trying to recover root file system files for a system recovery without BMR is covered by a separate document on this site.