Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Multi-DVD or (multi-CD) spanning backups with tar' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Multi-DVD or (multi-CD) spanning backups with tar
Authored by: ruaric on Jun 24, '05 01:12:25PM
Interesting! However I think there is a way around this. GNU tar, which both xtar and hfstar are based on include an -L switch which allows you to limit the size of the archive. From the help page:
-L, --tape-length=NUM
This prompts to change tape after writing NUM x 1024 bytes. Unfortunately, I don't believe that Tiger tar includes this so even Tiger users would need to continue to use xtar or hfstar.

One other thing I notice though is that using Tiger the archive would now be created in a subdirectory of a directory that is being tarred (~/Desktop/.fpbf is within /Users). This would surely cause a problem since the tar archive would include itself.

Of course if you are just backing up your 'own' user folder (for example in my case that would be /Users/ruari) you could still do it quite simply. Just switch to different user and run the commands as:


$ cd /
$ sudo xtar --tape-length=4900000 -cvpMf /Users/<differentusername>/Desktop/<cd name>.fpbf Users/<regularusername>/
This would create each part as a 4.67GB file (I think DVDs hold ~=4.7GB, so I made this a bit smaller just to be sure, but you could adjust this figure to suit you). Everything else would be the same as my old instructions for Panther. ;-)

If you did want to grab the whole /User folder this 'might' work:


$ cd /
$ sudo xtar --tape-length=4900000 --exclude=/Users/<username>/Desktop/<cd name>.fpbf -cvpMf /Users/<username>/Desktop/<cd name>.fpbf Users/
(Alternatively, the -X switch allows you to specify a file containing a list of excludes).

If for some reason this didn't work here is another way:


$ cd /
$ mkdir /tmp/multipartdvdbackup/
$ sudo xtar --tape-length=4900000 -cvpMf /tmp/multipartdvdbackup/backup.tar Users/
When prompted for the next DVD open a new terminal window and type:

$ open /tmp

Then use the burn folders thing in Tiger to burn the "multipartdvdbackup" folder. After this is done delete backup.tar and then hit enter in the original terminal window to start making part two (and so on).

Yes the last one is a bit more messy but I think it should work (I don't have Tiger to try it out!)

(If you aren't backing up whole user folders but just want to span a few files across multiple DVDs there should be no problems with taring the tar file).

[ Reply to This | # ]

Multi-DVD or (multi-CD) spanning backups with tar
Authored by: rflo on Jun 24, '05 04:02:41PM
Tiger tar, which is based on gnutar, does include the -L n option. I think n should be 4550000 for a DVD. (File size = n * 1024.) I slapped together a little shell script to set up the backup file names (and to remember the whole sequence for me with an echo reminder).

#!/bin/sh

day=`date "+%y%m%d"`
file= /tmp/backup-$day
cd /

echo "When tar asks for a new volume, use the burn folder feature in the Finder, 
then erase $file/backup.tar before hitting return to restart tar."

mkdir $file
sudo tar -L 4550000 -cvpMzf $file/backup.tar Users usr/local

It should be possible to code some applescript to burn the folders. I'll leave that exercise for whoever has the time.

---
Ronald Florence

[ Reply to This | # ]

Multi-DVD or (multi-CD) spanning backups with tar
Authored by: GlowingApple on Mar 14, '06 08:59:58AM

Technically I believe you would convert 4.7 GB to MB and then convert MB to KB:

4.7 * 1024 * 1024 = 4,928,307 KB

So 4928307 is the supposed max for a DVD (though usually DVD-R and DVD+R can hold a little more, so you could probably round up a bit or to be safe (allow space for the session open and close data, etc), round down a bit).

---
Jayson --When Microsoft asks you, "Where do you want to go today?" tell them "Apple."



[ Reply to This | # ]
Multi-DVD or (multi-CD) spanning backups with tar
Authored by: tinker on Jun 27, '05 12:51:48PM
Interesting hint!! One question: Could this --
$ cd /
$ sudo xtar --tape-length=4900000 -cvpMf /Users/<differentusername>/Desktop/<cd name>.fpbf Users/<regularusername>/
-- be modified in order to get it to produce a set of one-DVD-sized tarballs in /Users//Archive/, say? That way, I could have it create the tar archives via cron while I sleep every week, and then just burn the DVDs, saving a fair bit of time in the process.

[ Reply to This | # ]
Multi-DVD or (multi-CD) spanning backups with tar
Authored by: ruaric on Jun 29, '05 09:04:05AM

Yes, use -F or --info-script=FILE

This allows you to run a script at end of each tape. That way you could write to a tar file of a set size, when the first part is done you could have a script move that part to a subfolder called part1, when the next part is done it could move it to a subfolder called part2 (it could know to increase the folder number because the folder part1 already exists), and so on.

At the end you would have several folders each with a single part in them. The reason for putting them in subfolders is of course the fact that they all have the same file name.

I'll leave you to work out a suitable script! ;-)



[ Reply to This | # ]