LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   split or tar -M -L? (https://www.linuxquestions.org/questions/linux-software-2/split-or-tar-m-l-451745/)

Slacker0815 06-05-2006 06:22 AM

split or tar -M -L?
 
Hi,

I need to split and backup a 100GB file (dm-crypt container file) on dvd. I've searched the forum and it seems there are two basic ways to do that:

1.) split the file with the split command
2.) split the file with tar and the options -M -L

Which is the better way to do it? Are there any problems to expect because of the filesize? Or does one of the tools have problems with binary files?

jschiwal 06-05-2006 07:46 AM

I think that using tar might be preferable. Using split you would have files with numbered extensions, but reassembling the file may be difficult.
You would need to append each successive disk to the end of the file you are restoring.
tar stands for tape archiver. The dar program (disk archiver) may be better suited for backing up to dvd's. It will also allow you to use compression.

An archive that large would take up 22 dvd discs. If you have a small error in any one of them, the archive is lost. You may want to purchase a large external hard drive to make the backups instead. You might also consider not using such a large file. Before I did a fresh install, I backed up my documents using both tar and split. I was backing up to a usb drive with fat32 filesystem. Because of the filesize limit, I piped the output of tar to split to create the files on the usb disk. I was able to restore by CATing the split files together with the output piped into tar. Using pipes, I didn't have to create a very large archive at all. The data saved wasn't 100GB in size, but it was around 10GB. I used par2 to create redundancy files in case some of the files became corrupted.

Slacker0815 06-05-2006 07:54 AM

What do you mean with "reassembling may be difficult"?

EDIT: Just saw your edit. Can't the reassembling just be done with a single command using * as described here: http://www.linuxquestions.org/linux/...assemble_files

jschiwal 06-05-2006 04:23 PM

If you have something like 22-25 dvd's, they each need to be read in one at a time.
If you have 200 GB free space on the drive you could copy the segments onto a drive and then cat them together. If not, you need to do something like:
cat /media/dvd/container.* >> /home/username/container
to add each of the segments.

Backing up the file image of such a large filesystem does not seem very robust to me. Especially if there is only 10 GB or so of contents, and the contents are compressible. Backing up the contents would also allow incremental backups done more frequently. The kdar program (if you run KDE) which is a frontend to the dar program is handy at backing up to DVDs.


All times are GMT -5. The time now is 07:13 PM.