You are not logged in.

#1 2009-03-26 17:18:38

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

I'd like to backup my / partition...

I was thinking to:
1- create an empty file large almost as the free space.
2- delete that file.
3- using dd if=/dev/sda1 of=/dev/stdout bs=X count=Y | bzip >sdabackup.gz

X and Y will be the number fdisk -lu says me.
the first two passages are meant to zero the free space, so bzip can compress better.

Good idea? Bad idea?
Any comment is welcome.

Offline

#2 2009-03-26 17:31:54

ogronom
Member
From: Toronto, Canada
Registered: 2008-05-06
Posts: 123

Re: I'd like to backup my / partition...

What is the purpose for 1 and 2?
Nevermind sorry.
How to delete this post?

Last edited by ogronom (2009-03-26 17:33:29)

Offline

#3 2009-03-26 18:33:55

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: I'd like to backup my / partition...

Hm, , i like to do backups with like this post I saw in ubuntu forums:

http://ubuntuforums.org/showthread.php?t=35087

Except i like to do it from a livecd (or similar):

mount /dev/sdax /mnt/

Then do the command because backing up a live filesystem is a bad thought smile


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#4 2009-03-29 08:34:22

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Re: I'd like to backup my / partition...

good point, but probably it is enough remounting readonly:
1- create an empty file large almost as the free space.
2- delete that file.
3- using `mount -n -o remount,ro /' I remount the partition read only.
3- using 'dd if=/dev/sda1 of=/dev/stdout bs=X count=Y | bzip >sdabackup.gz' I do the real backup.

Surely, when I have to put the backup back, it is better to use a livecd.

Offline

Board footer

Powered by FluxBB