Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Restore switches?

Status
Not open for further replies.

ushoc

Technical User
Aug 1, 2001
5
IE
Apologies if this is a remedial question, Im not familiar with AIX.

I have a box (box A)running aix 4.3.2 which has been cloned onto a similar box (box B)using a mksys tape. I've since restored data from box A onto box B using the cmd restore -xvf /dev/rmt1.

Since then i found that I need to overwrite this data with the same backup. I used the same command but I'm not sure that it did actually overwrite the data that was restored from the previously.

The backup command used to backup the box is
backup -ivf /dev/rmt1 -p -q. The directories that it backs up are data areas ( The /var /usr /home etc arent being backed up, I'm guessing the mksys took care of them)

My query is, Will restore -xvf overwrite the data in the directories that were previously restored with this command?

Should I use the -r switch instead? Bearing in mind that i dont want to nix the OS?

Cheers


 
AFAIK the xvf should be all that's required. What makes you think that the data wasn't overwritten?

I want to be good, is that not enough?
 
After the first restore I created some files which remained in place after the second restore. Given that the backup/restore is from the root directories (ie /dir1 /dir2 )I would have thought that they would have been overwritten.

 
As long as the filenames were unique (ie didn't have counterparts on the tape), they wouldn't be overwritten by anything you restored.

I want to be good, is that not enough?
 
The "xvf" restore will do what it says on the tin, and restore the files from media overwriting files of the same name. But if you have created NEW files then these will remain no matter how many times you restore from the media.

If you want to revert your directories/files to the state they were in at backup time, you need to empty the directories before starting the restore. Any NEW files will remain as there is no mechanism to delete files in the target directories that do not have an equivalent (filename) image on the tape.

But be careful of which directories you choose to empty before you restore. In an ideal world you would re-create the filesystems before restoring - but this isn't practical in many instances.

HTH.

<
 
I think the directory specific restore will be helpful for you. The following is from the IBM documentation

# To restore a specific directory and the contents of that directory from a file-name archive, type:

restore -xdvqf /dev/rmt0 /home/mike/tools

The -x flag tells restore to extract files by their file name. The -d tells restore to extract all the files and subdirectories in the /home/mike/tools directory. File and directory names must be specified as they are displayed when using the -T flag. If the directories do not exist, they are created.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top