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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Restoring a "tar" Backup with Absolute Path Names to a Different Direc 2

Status
Not open for further replies.

vivek1712

Technical User
Dec 17, 2002
47
IN
A tar backup created using absolute path names can only be restored to the directory from which it was created. One way to restore it to a different directory is by using the pax command.
For example, suppose you receive a tar tape created using absolute path names:
tar -cvf /dev/rmt0 /work/*
but want to restore it to the /test directory. The pax command would be:
pax -rf /dev/rmt0 -s/work/test/p
The -s/work/test/p does the directory change.

Best Regards,
vivek
 
This is a great tip. In the past I have needed to restore from a multiple level directory i.e. /home/ops/raypru. Restoring to /tmp can be achieved by the following:-

pax -rf /dev/rnt0 -s/home\\/ops\\/raypru/tmp/p

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top