Backup without compression ?


Forum: Other Help Topics
Topic: Backup without compression ?
started by: humpty

Posted by humpty on Oct. 10 2007,16:42
Is there a way to backup.tar.gz without compression ?
(it could save some shutdown time).

Posted by WDef on Oct. 10 2007,17:09
As an alternative to hacking the backup scripts, you could always backup and restore manually without compression, perhaps automate suitably via bootlocal.sh and powerdown.sh:

Code Sample
# backup (as root)
cd /; tar -T ~/.filetool.lst -cvf /path/to/backup.tar

# restore (as root)
cd /; tar -xvf /path/to/backup.tar



Make sure /path/to is mounted first.

Posted by humpty on Jan. 03 2008,03:15
thanks WDef, this is blazingly faster now.

Code Sample
# fast_backup
echo backing up..
tar -C / -T /opt/.filetool.lst -X /opt/.xfiletool.lst -cf /mnt/hdc1/backups/mybackup.tar
echo syncing..
sync
echo done

# fast_restore
tar -C / -xf /mnt/hdc1/backups/mybackup.tar


doesn't seem to be a need for root if running from aterm,
though i had to leave out stuff like home/dsl/.fluxbox/menu
(using .xfiletool.lst)

after the sync it's just power-off -great!

Posted by roberts on Jan. 03 2008,15:21
Use caution with this. I recall when it was discussed to try to determine the size of the backup before writing to the backup device.

Typically the files included in the backup, by design,  are data and not binary. Therefore the size of the backup could increase dramatically. Be aware of the "broken pipe" error, which occurs when you have run out of room on the backup device. The result is that you will lose your backup file.

Posted by jpeters on Jan. 03 2008,16:09
Quote (humpty @ Jan. 02 2008,22:15)
echo syncing..
sync

Curious how the sync command helps...manual says that it prints from the buffer or something.

Edit:  Looks like a security measure to make sure everything in the buffer gets printed before some unusual shutdown; that's the most I can make out of it, anyway. Would this be recommended as the standard procedure when backing up?

Posted by WDef on Jan. 03 2008,20:27
Doing sync is a good idea after writing any file to disk when there is a risk that the drive might get disconnected shortly after, or when you otherwise want previous writes to be finished  - otherwise data might still be sitting in the buffer and never have time to get written.

Especially important with slow-writing devices like usb sticks.

umount is supposed to call sync, so the buffer should get flushed on umounting the drive.

Posted by humpty on Jan. 05 2008,03:49
i forgot to mention that this method is only good for target media which has a linux partition e.g ext2.
FAT16/32 partitions do not preserve ownerships nor permissions.

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.