LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   Tar error: cannot write: invalid argument (https://www.linuxquestions.org/questions/red-hat-31/tar-error-cannot-write-invalid-argument-497653/)

kaplan71 11-01-2006 03:53 PM

Tar error: cannot write: invalid argument
 
I am trying to do a tar backup to a locally attached tape drive. The tape drive is attached via an Adaptec 2930 SCSI card, and is a DAT drive with the SCSI ID 3. The device file that I am using is /dev/st0.

Whenever I try to do a backup I use the following syntax:

# tar -cvf /dev/st0 /tmp <directory>

The error message I am getting is the following:

tar: /dev/st0: Cannot write: Invalid argument
tar: Error is not recoverable: exiting now.

The operating system is Fedora Core 5, and the version of tar is GNU tar 1.15.1.

stress_junkie 11-01-2006 04:18 PM

Quote:

Originally Posted by kaplan71
# tar -cvf /dev/st0 /tmp <directory>

You have too many parameters. Remove /tmp and see what happens.

kaplan71 11-02-2006 07:14 AM

When I run the command tar -cvf /dev/st0 the error message I get is the following:

tar: Cowardly refusing to create an empty archive.

stress_junkie 11-02-2006 10:37 AM

Well now you don't have enough parameters. Apparently you removed both the /tmp and the <directory>. Here is an example to back up the /home directory tree to /dev/st0.
Code:

tar -cvf /dev/st0 /home


All times are GMT -5. The time now is 09:46 AM.