Discussion Locked

Restoring selected files from tar backup

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
How can a selected directory with all of it's contents be restored to a different directory than from which it was backed up? We do a full 'tar' backup of our UNIX system to tape every night. We want to restore a selected directory with it's directories, files, and links to a temporary directory which is not at the original directory location. This is so a programmer can restore selected files which he deleted in error. We did this by copying the current directory on disk to a temporary location, using 'tar' with the '-C' option to restore the directory to it's original location. Then we moved the restored directory to another directory and then copied back the current directory. Is there a better way to do this?

3 replies

by md_hashim

Have you chacked the man pages - Solaris and HPUX have different options. What flavour of UNIX do you use?
'man tar' will list the options you can use. Let me know if this helps

This discussion is closed to new replies.