Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How can I back up my 15GB root partition to a 1 GB partition
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
Stu L Tissimus
Veteran
Veteran


Joined: 08 Jun 2003
Posts: 1339
Location: NJ, 5 minutes from NYC

PostPosted: Thu Aug 21, 2003 9:19 pm    Post subject: How can I back up my 15GB root partition to a 1 GB partition Reply with quote

I have a thing with messing up Gentoo, usually by crashing XF86 and then having the partitions get messed up. So, I came up with an idea to back it up. I have 180 gigs, so 1 gig for backup isn't a big deal for me. So..... HOW?
_________________
old outdated sig
Back to top
View user's profile Send private message
bmichaelsen
Veteran
Veteran


Joined: 17 Nov 2002
Posts: 1277
Location: Hamburg, Germany

PostPosted: Thu Aug 21, 2003 9:48 pm    Post subject: Reply with quote

if you are using ext2/3 you could use dump. It even provides incremental backups. And webmin provides a neat frontend for it (scheduling with cron etc.)
Back to top
View user's profile Send private message
Stu L Tissimus
Veteran
Veteran


Joined: 08 Jun 2003
Posts: 1339
Location: NJ, 5 minutes from NYC

PostPosted: Thu Aug 21, 2003 10:36 pm    Post subject: Reply with quote

Unfortunately, my root partition is ReiserFS and the backup is Reiser also...

Well, would an unbelievably stupid and easy thing like
Code:

mount /dev/hdb6 /mnt/backup
cp / /mnt/backup
umount /dev/hdb6

work?
_________________
old outdated sig
Back to top
View user's profile Send private message
puntium
n00b
n00b


Joined: 14 Mar 2003
Posts: 24

PostPosted: Thu Aug 21, 2003 10:43 pm    Post subject: dont forget flags for cp Reply with quote

Make sure you do something like

cp -rx / /mnt/backup

Otherwise you'll get in an infinite loop.
Back to top
View user's profile Send private message
Stu L Tissimus
Veteran
Veteran


Joined: 08 Jun 2003
Posts: 1339
Location: NJ, 5 minutes from NYC

PostPosted: Thu Aug 21, 2003 11:09 pm    Post subject: Reply with quote

Thank you, a lot. However, just one more question. You positive that'll work?
_________________
old outdated sig
Back to top
View user's profile Send private message
bmichaelsen
Veteran
Veteran


Joined: 17 Nov 2002
Posts: 1277
Location: Hamburg, Germany

PostPosted: Thu Aug 21, 2003 11:23 pm    Post subject: Reply with quote

Quote:
cp -rx / /mnt/backup

cp might misbehave with files in /dev i think ... and you copy the whole fs all the time ...
how about
Code:
rsync -rax / /mnt/backup

mind the -a flag, see man-page for details ...
Back to top
View user's profile Send private message
someguy
Guru
Guru


Joined: 10 Jul 2003
Posts: 433
Location: (-_-) .::OH_WELL::. (-_-)

PostPosted: Sat Aug 23, 2003 12:39 am    Post subject: Reply with quote

you can taryour /filesytem
_________________
print pack"C*",split/\D+/,`echo "16iII*o\U@{$/=$z;[(pop,pop,unpack"H*",<>
)]}\EsMsKsN0[lN*1lK[d2%Sa2/d0<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<J]dsJxp"|dc`
while [ 1 ] ; do echo "*" | telnet ip.of.print.er 9100 ; done
Back to top
View user's profile Send private message
meowsqueak
Veteran
Veteran


Joined: 26 Aug 2003
Posts: 1549
Location: New Zealand

PostPosted: Thu Aug 28, 2003 6:04 am    Post subject: Reply with quote

Stu L Tissimus wrote:
You positive that'll work?


You might want to use cp -a as that will include -p (preserve mode, ownership and timestamps). You can also use -x to avoid any mounted filesystems. You're still going to have a problem with those /dev inodes however. I would recommend using a shell pipe via tar or cpio if you are short on space, or just tar it all up and shift it over. As mentioned earlier, rsync would work fine too.
Back to top
View user's profile Send private message
zhenlin
Veteran
Veteran


Joined: 09 Nov 2002
Posts: 1361

PostPosted: Thu Aug 28, 2003 7:29 am    Post subject: Reply with quote

Just tar.bz2 onto a raw partition. No cycling there.

Squeezing 15GB into 1GB requires ALOT of compression. Not very easy... I think you're better off backing up to 8 or 9 GB partitions.
Back to top
View user's profile Send private message
toskala
Advocate
Advocate


Joined: 14 Dec 2002
Posts: 2080
Location: hamburg, germany

PostPosted: Fri Aug 29, 2003 11:22 am    Post subject: Reply with quote

tar -cvjf foo.tar.bz2 /foo

but i dont think you will be able to compress 15gb to 1gb :)
_________________
adopt an unanswered post
erst denken, dann posten
Back to top
View user's profile Send private message
zhenlin
Veteran
Veteran


Joined: 09 Nov 2002
Posts: 1361

PostPosted: Fri Aug 29, 2003 12:33 pm    Post subject: Reply with quote

That will be snake eating tail... when tar encounters itself, it will recursively grow bigger...
Back to top
View user's profile Send private message
toskala
Advocate
Advocate


Joined: 14 Dec 2002
Posts: 2080
Location: hamburg, germany

PostPosted: Fri Aug 29, 2003 12:49 pm    Post subject: Reply with quote

of course you have to place your foo.tar on the backup partition :-)
_________________
adopt an unanswered post
erst denken, dann posten
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