Web Hosting Talk







View Full Version : Setting up backup script, but tar is limited to 2 GB files?


pmak0
06-01-2001, 06:49 PM
I setup a backup script on my machine recently to create weekly full backups and daily incremental backups by tarring the files on the primary hard drive and putting the tar file on the secondary hard drive.

But I just did a ls and saw this:

[pmak@sg1 backups]$ ls -l
total 2099204
-rw-r--r-- 1 root root 2147483647 Jun 1 04:21 sg1-01Jun.tar

Notice that the size of the backup file is exactly 2^31 - 1. This suggests that some data was truncated at the end because it can't be bigger than 2 GB.

What can I do to get around this problem? Does someone have a better backup script, perhaps?

pmak0
06-01-2001, 07:16 PM
I figured it out; this operating system cannot create files bigger than 2 GB.

I'll try applying bzip2 to the tar files (bzip2 is like gzip, but is easier to recover if parts of the file are lost); maybe it'll fit under 2 GB then. If not, I'll have to split the backup file up somehow.

Madman2020
06-04-2001, 01:52 AM
Originally posted by pmak0
I figured it out; this operating system cannot create files bigger than 2 GB.

I'll try applying bzip2 to the tar files (bzip2 is like gzip, but is easier to recover if parts of the file are lost); maybe it'll fit under 2 GB then. If not, I'll have to split the backup file up somehow.

Yeah, bzip2 is your only shot for that since it compresses in blocks.