Is there any possibilty to restore backup taken with backupby file name to any other filesystem

Hi,

I have taken a backup of filesystem " /backup " by using backupby file name command on tape

Mount volume 1 on /dev/rmt0.
Press Enter to continue. Backing up to /dev/rmt0.
Cluster 51200 bytes (100 blocks).
Volume 1 on /dev/rmt0
a          0 /backup       
a        543 /backup/abc_log       
a        943699 /backup/xyz.log       
a     5677871104 /backup/Datafilemain.dmp       
a      33583343 /backup/Coredatafile1dmp.Z   

Now I want to restore the contents of the above listed backup to some other filesytem for.eg. I want to restore it all the files in /new_backup.

How this can be accomplished? Any help would be appreciated.

make the new filesystem
cd to new directory
restore -xqf /dev/rmt0

that simple.

hope this helps.

I have created new filessytem /new_backup & use the same command restore -xqf /dev/rmt0 but the files were restored to /backup instead of /new_backup

x /backup
x /backup/abc_log
x /backup/xyz.log
x /backup/Datafilename.dmp
x /backup/Coredatafile1.dmp.Z

:frowning:

Please advice

Ah, the file names are hard coded to /backup rather than ./backup

So, depends on whether the directory /backup can be offline or not.

If it can be offline then just mount the new filesystem on /backup manually, and restore. Unmount /backup and mount again in the "new" location.

This is what I would prefer to having /backup as a symbolic link to your new location.

Summary

# mklv -y lvNewBackup -t jfs2 vgBackups XXXg
# crfs -v jfs2 -d lvNewBackup -m /newBackup -A no # no auto mount
# # assuming /backup is a filesystem
# umount /backup
# mount -o log=NULL /dev/lvNewBackup /backup
# restore -xqf /dev/rmt0
# unmount /backup
# mount /newBackup
# mount /backup

lvNewBackup is a name of your choosing for the logical volume
vgBackups is the name volume group you are creating the new logical volume/filesystem in

1 Like