Discussion Locked

Using Tar command to backup files

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi there,

I have my tape backup working now, and I want to start to use it to backup my files.
Now I have tried to use it but it dosen't seem to be working quite right for me.
Here is what I have for commands.

tar cv home/*.* > /dev/nst0

The tape backup starts up, then an error says that there is no file and then stops.

Any ideas?

I do know that the tape backup is working, I have the statistics from it and it says that it is working.

Thanks

6 replies

by gazz

Try this syntax:
tar cv /home /dev/nst0

This will get all files and directories in the /home directory.

by gazz

Stillatit is correct.....I had it reversed. The correct syntax is:
tar cvf /dev/nst0 /home

sorry.

by stillatit

On AIX: tar -cvf/dev/nst0 /home

On HP-UX: tar -cvf /dev/nst0 /home

Note that if you use /home/*.* you will only get files which contain a period. If you want to specify all files, your could also use /home/*
If you use /home you back up thedirectory and its files. If you use /home/* you only get the files.

As you move from OS to OS, there are minor variations in commands. Check the man file on your system for local specifics (type "man tar").

Good luck.

This discussion is closed to new replies.