Question regarding tar restore


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Question regarding tar restore
# 1  
Old 04-01-2004
Question regarding tar restore

I created a relative backup of my home directory using tar into a file named backup.tar.
No problem there.
I checked it out using the table of contents command to list the contents of the backup.tar file, and there is no problem there either.
But, when I tried restoring backup.tar into a directory that I created called tar-restore, I am getting the following error:

$ cd tar-restore
$ tar -xvf backup.tar
tar: backup.tar: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now

Now, it's saying that backup.tar doesn't exist, but it does! Can someone please explain what the problem is?

Thank you
# 2  
Old 04-01-2004
Notice that you did a "cd tar-restore". At this point "tar xvf backup.tar" tells tar to look in tar-restore. If backup.tar is in tar-restore's parent directory, use "tar xvf ../backup.tar".

Or "tar -xvf ../backup.tar". tar is an odd program that was written before the - convention was established. It works both ways.
# 3  
Old 04-04-2004
Thank you!
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. HP-UX

Unable to restore *.tar file

I tarred a directory to a different location. I then deleted the original directory. Now I need to restore the directory, and I am unable to do so (The contents do not get restored). However, when I type tar -tvf <tarfile), the list of contents are displayed : # tar -tvf lhs20170405.tar... (7 Replies)
Discussion started by: anaigini45
7 Replies

2. Shell Programming and Scripting

Tar question

Hi all, newbie here. Could anyone help me how to combine a tar -c and tar -x command such that the source file/folder is archived into a target file in the destination folder (may or may not be in the same server), and extracted directly (through pipe?) in that same destination folder? Thanks... (2 Replies)
Discussion started by: frys_hp
2 Replies

3. AIX

Backup and restore question

I run a backup sucessfully: find . | backup -ivqf/dev/rmt0 I want to make sure I can restore, so I change to a test directory and try this: restore -rvqf /dev/rmt0 However, we fail with this error: New volume on /dev/rmt0: Cluster size is 51200 bytes (100 blocks). The volume number is... (3 Replies)
Discussion started by: landog
3 Replies

4. Red Hat

Backup and restore using tar

This will be covered elsewhere im sure but i just cant seem to find my exact issue. I want to backup my systems using tar, command is: tar -cjpf /backup /bin /etc /home /opt /root /sbin /usr /var /bootWhen i include the / directory it also tar's the /lib /sys /proc /dev filesystems too (and... (8 Replies)
Discussion started by: Tommyk
8 Replies

5. Solaris

how to restore an entire system from a tar file?

Hi folks, I have an image backup of an entire file system (Solaris 9 on N240) on a tar file. How can I use this tar file to retore my system? Thanks, omd (1 Reply)
Discussion started by: omd
1 Replies

6. UNIX for Dummies Questions & Answers

Restore files with TAR -- Help

Hi, Can anyone tell me the right TAR command to restore all the files dirs/subdirs/files etc. to a given directory on my hdd from a TAPE drive? I already used the list function to see that there is data on it with this commando: # tar tf /dev/st0 Now I need to copy all the data to a... (1 Reply)
Discussion started by: severt
1 Replies

7. UNIX for Dummies Questions & Answers

tar - restore only file of specific dates

hi there, anybody know if there is any efficient way of restoring only files of specific dates from a tape (with tar command)? :rolleyes: coz the tapes containing few weeks' files, but i need only files of a few days..... any kind feedback is appreciated. Thanks in advanced. (0 Replies)
Discussion started by: newbie168
0 Replies

8. Solaris

tar - restore a file

We use tar for backing up a server. I need to restore just one file from this backup. Anyone know the syntax? (2 Replies)
Discussion started by: frustrated1
2 Replies

9. UNIX for Dummies Questions & Answers

tar question

Folks, I've created a tar file on tape using: tar xvf /dev/rmt0 The directory I was in was: \IMPULS\F50D01\temperik under temperik the tar command created subdirectories. I need too BACKUP these subdirectories again and restore them on another machine, But when i'm going to... (10 Replies)
Discussion started by: Erik Rooijmans
10 Replies

10. UNIX for Dummies Questions & Answers

Cannot restore a TAR backup

I backed up a unix database using "tar -cvf /dev/rmt1 -N 800 /*" Normally I would restore this using "tar -xvf /dev/rmt1 -N 800" This is reporting an error about "not enough memory" I have done a new test backup and restore using the same commands and they work. ANY IDEAS ? (2 Replies)
Discussion started by: Ross.Goodman
2 Replies
Login or Register to Ask a Question