Tar + Tapes = Troubles =@(
Howdy Folks.
Need some help please regarding tarring files to tape and restoring them. My question is how to I tar several files to tape and then have access to restore all of them. At present I can only backup and restore 1. Everything I backup after the first one cannot be found on the tape.
I have 4 folders which I want to tar up, backup, and remove each night (they change via rsync)
This is my procedure:
1. Tar up the first file,
tar -czvf folder1.tar.gz folder1
2. Back it up to tape,
tar -cv -b 16384 -f /dev/nst0 folder1.tar.gz
3. Then remove folder1.tar.gz (short on space on server)
Then I do steps 1, 2 and 3 for folders 2, 3 and 4.
I get no errors reported and my logs show that the files have been sent to tape.
The problem I have is when I try to restore. I can only restore the FIRST .tar.gz file. I have been using this to restore:
tar -xv -b 16384 -f /dev/nst0 folderX.tar.gz
If I try to restore folders 2,3 and 4 I get an error that they cannot be found on the tape. I thought I knew what the problem was; I thought it was because I only had 1 archive and that I was create a new archive each time. So I tried backing the first file as normal:
tar -cv -b 16384 -f /dev/nst0 folder1.tar.gz
And then backing up the others with:
tar -rv -b 16384 -f /dev/nst0 folder1.tar.gz
So instead creating a new archive I appended the files to the old one. However that didnt work, when I listed the files on the tape I only got the first file.
I then tried using:
tar -Av -b 16384 -f /dev/nst0 folder1.tar.gz
to concatenate the file to the archive and again, it seemed to backup fine, but on listing the files on the tape, I only get the first.
Should what I have tried worked? Am I missing something? Unfortunately I do not have enough space on the server to create a single tar ball of the folders (one is 16GB) so that oh so simple, stressless, option is out.
If you can help, you'll save my job!
Thanks guys
|