LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   tar file twice? put to tape? Gzip? (https://www.linuxquestions.org/questions/linux-software-2/tar-file-twice-put-to-tape-gzip-540262/)

jantman 03-24-2007 03:29 PM

tar file twice? put to tape? Gzip?
 
So in doing my backups, I tar & gzip up a directory locally, then move it to a staging drive mounted via NFS.

Now, once a week, I write them to tape. So, I end up taking a .tar.gz archive and tar'ing it again to the tape. Is this bad? Is there any other way that's considered better?

The total backup is ~7Gb, so transferring the un-gzipped files over the network (NFS) is a bit of a pain...

pixellany 03-25-2007 09:17 AM

It's hard to get a complete picture of what you are doing. If you have a .tar.gz file, why would you need to tar it again to write it to tape.

Is the transfer to tape done at a remote computer?
Where is the "staging drive"?

jantman 03-25-2007 11:07 AM

The staging drive is on a dedicated NFS server. The staging drive has, at the moment, six directories, one for each host, each with 14 days' worth of full nightly backups. Each nights' backup is in its own directory, and contains files like etc.tar.gz home.tar.gz srv.tar.gz sqldump.tar.gz, etc.

The tape drive is on another machine. The other machiene handles the tape procedure by mounting the NFS share, and running a script that at the moment tar's all of the latest backup directories and outputs them to the tape drive.

bigrigdriver 03-25-2007 02:01 PM

Question: Have you tried extracting such a tar.tar sauce (sorry, the devil made me say it)?
a. if you can restore files, no harm done (thorough test required because re-compressing a compressed file may have unexpected results).
b. if you can't restore files, your backups are useless unless you can find a way to extract them.

If there are problems with re-tarred tar archives, try modifying the script to just write the files to tape, rather than tar a bunch of files which are already in tar archives.

Keep in mind, in a tar archive, if any part of the archive is corrupt, you risk the entire archive unless you have a tool which can repair or extract files from a corrupt archive.

It might be in your best interest to investigate DAR, which can make compressed archives, but each file in the archive is seperate from the others. If one is corrupt, you only loose the one; not the entire archive.

jantman 03-25-2007 03:01 PM

I don't want to sound ignorant, but this is my first time using a tape drive. How can I write the files to tape without using an archive tool like tar or cpio?


All times are GMT -5. The time now is 04:31 AM.