View previous topic :: View next topic |
Author |
Message |
Stu L Tissimus Veteran
Joined: 08 Jun 2003 Posts: 1339 Location: NJ, 5 minutes from NYC
|
Posted: Thu Aug 21, 2003 9:19 pm Post subject: How can I back up my 15GB root partition to a 1 GB partition |
|
|
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 |
|
|
bmichaelsen Veteran
Joined: 17 Nov 2002 Posts: 1277 Location: Hamburg, Germany
|
Posted: Thu Aug 21, 2003 9:48 pm Post subject: |
|
|
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 |
|
|
Stu L Tissimus Veteran
Joined: 08 Jun 2003 Posts: 1339 Location: NJ, 5 minutes from NYC
|
Posted: Thu Aug 21, 2003 10:36 pm Post subject: |
|
|
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 |
|
|
puntium n00b
Joined: 14 Mar 2003 Posts: 24
|
Posted: Thu Aug 21, 2003 10:43 pm Post subject: dont forget flags for cp |
|
|
Make sure you do something like
cp -rx / /mnt/backup
Otherwise you'll get in an infinite loop. |
|
Back to top |
|
|
Stu L Tissimus Veteran
Joined: 08 Jun 2003 Posts: 1339 Location: NJ, 5 minutes from NYC
|
Posted: Thu Aug 21, 2003 11:09 pm Post subject: |
|
|
Thank you, a lot. However, just one more question. You positive that'll work? _________________ old outdated sig |
|
Back to top |
|
|
bmichaelsen Veteran
Joined: 17 Nov 2002 Posts: 1277 Location: Hamburg, Germany
|
Posted: Thu Aug 21, 2003 11:23 pm Post subject: |
|
|
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 |
|
|
someguy Guru
Joined: 10 Jul 2003 Posts: 433 Location: (-_-) .::OH_WELL::. (-_-)
|
Posted: Sat Aug 23, 2003 12:39 am Post subject: |
|
|
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 |
|
|
meowsqueak Veteran
Joined: 26 Aug 2003 Posts: 1549 Location: New Zealand
|
Posted: Thu Aug 28, 2003 6:04 am Post subject: |
|
|
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 |
|
|
zhenlin Veteran
Joined: 09 Nov 2002 Posts: 1361
|
Posted: Thu Aug 28, 2003 7:29 am Post subject: |
|
|
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 |
|
|
toskala Advocate
Joined: 14 Dec 2002 Posts: 2080 Location: hamburg, germany
|
Posted: Fri Aug 29, 2003 11:22 am Post subject: |
|
|
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 |
|
|
zhenlin Veteran
Joined: 09 Nov 2002 Posts: 1361
|
Posted: Fri Aug 29, 2003 12:33 pm Post subject: |
|
|
That will be snake eating tail... when tar encounters itself, it will recursively grow bigger... |
|
Back to top |
|
|
toskala Advocate
Joined: 14 Dec 2002 Posts: 2080 Location: hamburg, germany
|
Posted: Fri Aug 29, 2003 12:49 pm Post subject: |
|
|
of course you have to place your foo.tar on the backup partition _________________ adopt an unanswered post
erst denken, dann posten |
|
Back to top |
|
|
|