[Backup Restore] Remove "/" or define destination path
Hi guyz,
I am taking file system backup on Tape by find /Backup -print | sudo /usr/sbin/backup -i -v -f /dev/rmt0; now issue is, my backup on the tape is going with "/Backup/a/b/c.file" etc, while restoring I am getting issue That I need to mount /Backup directory with different partition. Is it possible to define the path file restoring? or remove "/" like we can do in "tar" command? |
Can you explain a bit more what you run into?
It has been a while since I used AIX, but if I recall correctly the backup command uses relative path by default. Too refresh my knowledge I did a little search and came up with this link that might help: - Relative and absolute backups with backup and restore |
Hi there,
Two suggestions, depending on the specific requirements & environment: 1. If it is possible to temoporarily remount filesystems, the easiest solution would be to mount the target filesystem as /Backup. 2. You could chroot into the destination directory to restore to there (assuming the target directory is empty). To do this, you need to just copy the restore command & related files into the directory first, though. I simulated this with the following steps (backed up /tmp, and restored to /test2/; using a file /test1/rmt0 for the backup as I don't have a tape drive): Quote:
|
Forgot to mention: for future backups you can avoid this problem by using relative paths in your backup, as follows:
Quote:
|
A different solution is to create a symbolic link between /Backup and /some/where/else
# ln -s /some/where/else /Backup |
clifford: good idea, however, -print is not needed. neither is sudo generally (sudo is often not installed)
so Code:
# cd /somewhere/.. Code:
# find ./somewhere | backup -if /dev/rmt0.1 Code:
mamfelt@x121:[/home/michael]ls -l /dev/rmt* |
All times are GMT -5. The time now is 03:04 AM. |