Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
backup of linux fs to vfat drive [Solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
bfdi533
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jun 2003
Posts: 133

PostPosted: Sat Feb 11, 2006 4:59 am    Post subject: backup of linux fs to vfat drive [Solved] Reply with quote

What is the best way to backup a linux partition (either reiserfs or ext2/3) to a vfat drive.

I have tried tar already and it bombs when it reaches the 4gb file size limit. I need to preserve ownership and permissions or I would just use something like rsync. My / partition is currently using 13.5gb and my /home partition is using 16gb and both need to be backuped pretty soon as I have read/write I/O errors on my / disk and it is reiserfs so will most likely not mount the next time my computer restarts.

Is dump/restore an option?

Do I need to figure out how to write the backup using tar in pieces that are smaller than 4gb and artificially chop this up myself?


Last edited by bfdi533 on Sun Feb 12, 2006 5:44 am; edited 1 time in total
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Sat Feb 11, 2006 5:53 am    Post subject: Reply with quote

Check out split and join for making the archive in smaller pieces. You should be able to pipe tar into split and make manageable pieces.

Is this a one time backup or do you plan on this becoming a regular backup procedure? I ask because there are better suited backups solutions. (incremental and full backups)

Something like this maybe:
Code:
tar czvf - source | split -b 650m - filename-

Obviously change source to the location to archive and filename to the archive name. (It should add incremental notations to filename)

And to re-assemble:
Code:
cat filename-* > file.tar.gz


Edit: Fixed syntax error in command.


Last edited by Headrush on Sun Feb 12, 2006 3:19 pm; edited 1 time in total
Back to top
View user's profile Send private message
tost
Guru
Guru


Joined: 10 Dec 2005
Posts: 506

PostPosted: Sat Feb 11, 2006 10:10 am    Post subject: Reply with quote

You can also install dar (Disk-Archive) from portage.
It´s based on tar and has lots of useful features.
It would split your backup however you want ;-)
http://dar.linux.free.fr/

tost
Back to top
View user's profile Send private message
wjb
l33t
l33t


Joined: 10 Jul 2005
Posts: 612
Location: Fife, Scotland

PostPosted: Sat Feb 11, 2006 3:37 pm    Post subject: Reply with quote

If you try dar, make sure it gets emerged with USE dar64 and not USE dar32. dar32 is the default, and will limit the maximum archive file size to 2^32 bytes (4Gb). A disadvantage with dar is that its not found on live CDs, which means you have to make sure you have a statically linked version of dar handy. The usual trick is to make a copy of this on the first backup disk.

Depending how desparate you are, is there any reason why you couldn't reformat the vfat partition to ext2/3 so you could use rsync or one big tar file?
Back to top
View user's profile Send private message
tost
Guru
Guru


Joined: 10 Dec 2005
Posts: 506

PostPosted: Sat Feb 11, 2006 4:20 pm    Post subject: Reply with quote

Quote:
If you try dar, make sure it gets emerged with USE dar64 and not USE dar32. dar32 is the default, and will limit the maximum archive file size to 2^32 bytes (4Gb). A disadvantage with dar is that its not found on live CDs, which means you have to make sure you have a statically linked version of dar handy. The usual trick is to make a copy of this on the first backup disk.


But with newer versions of Knoppix or Kanotix you can install packages from the internet..
apt-get install dar is all you need for this

tost
Back to top
View user's profile Send private message
drwook
Veteran
Veteran


Joined: 30 Mar 2005
Posts: 1324
Location: London

PostPosted: Sat Feb 11, 2006 4:26 pm    Post subject: Reply with quote

Either I've missed the point or I think others have...

1/ he wants to backup to FAT32, hence the size limit. Not an issue of the software he's using.
2/ obvious question - why not mkfs the FAT partition to something better suited?
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Sat Feb 11, 2006 5:52 pm    Post subject: Reply with quote

drwook wrote:
Either I've missed the point or I think others have...

1/ he wants to backup to FAT32, hence the size limit. Not an issue of the software he's using.
2/ obvious question - why not mkfs the FAT partition to something better suited?

Sounds like he has data on the vfat formatted drive already. He/she thinks his Linux drive is failing and needs to copy over stuff fast before it completely fails.
(No time to be emerging/learning new programs of formating partitions.)

Hence tar with split should do. We haven't heard from original poster in awhile, hopefully the drive wasn't lost before he/she got it backed up.
Back to top
View user's profile Send private message
bfdi533
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jun 2003
Posts: 133

PostPosted: Sun Feb 12, 2006 5:41 am    Post subject: Reply with quote

Headrush wrote:
Check out split and join for making the archive in smaller pieces. You should be able to pipe tar into split and make manageable pieces.

Is this a one time backup or do you plan on this becoming a regular backup procedure? I ask because there are better suited backups solutions. (incremental and full backups)


I had not thought of split and join but they are actually the perfect tools for what I need to do.

The syntax was slightly off and I had to check the man page to get it to work. Actually, it needs to be (note the - before the filename to receive input from stdin):

Code:
tar czvf - source | split -b 650m - filename-


This is not a regular backup situation. I need to get a backup of my system as my hard drive is dying and since the partition is reiserfs, it will most likely not mount the next time I reboot. I plan to reformat it as ext3 and restore the backup to it so that way if there are any bad blocks, at least I can mount the partition.

Thanks a lot!
Back to top
View user's profile Send private message
bfdi533
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jun 2003
Posts: 133

PostPosted: Sun Feb 12, 2006 5:44 am    Post subject: Reply with quote

Headrush wrote:

Sounds like he has data on the vfat formatted drive already. He/she thinks his Linux drive is failing and needs to copy over stuff fast before it completely fails.
(No time to be emerging/learning new programs of formating partitions.)

Hence tar with split should do. We haven't heard from original poster in awhile, hopefully the drive wasn't lost before he/she got it backed up.


My hard drive did not fail and yes, I already had data on the vfat drive so could not reformat it. It is actually an external USB drive and I store digital photos and music on it already. I have more data on the drive than free space on my system or I might just be tempted to move the data and reformat it.

Everyone has been quite helpful on this posting and I really appreciate it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum