View previous topic :: View next topic |
Author |
Message |
ReeferMac Guru
Joined: 30 May 2004 Posts: 389
|
Posted: Thu Mar 10, 2005 6:30 pm Post subject: Simple Backups |
|
|
So, I've been ahem learning, a great deal while working w/ gentoo, but have the need for a stable platform to ya know, use.
So... enter the extra partition.
Chopped up the disk so that my /home directory is on it's own partition, and have two identically sized partitions on the disk. What I want to be able to do, is periodically, manually, snap-shot the two partitions, so that I always have a 'backup' available, should I go and b0rk something w/ portage.
What I want tho, is a simplistic way of doing it... like booting off a knoppix CD, and using dd or tar or something.. however being / (root) I don't know if I have to boot to an alternate CD to copy all files, or what flags to set to get the permissions and everything right... (you know, all those fancy flags that handle pipes correctly, and all that jazz). Block count is identical according to fdisk, and the two partitions are on the same SATA hard disk. Thanks for any idea's or suggestions, as I think this is a bit over my head ATM.
- Mac |
|
Back to top |
|
|
MagnusBerg Guru
Joined: 07 Oct 2003 Posts: 370 Location: Burgsvik, Gotland, Sweden
|
Posted: Thu Mar 10, 2005 7:08 pm Post subject: |
|
|
Rdiff-backup is my suggestion. |
|
Back to top |
|
|
ReeferMac Guru
Joined: 30 May 2004 Posts: 389
|
Posted: Fri Mar 11, 2005 12:44 am Post subject: |
|
|
Thanks Magnus.
I'm on AMD64 and it's showing up masked in my portage tree.
- Mac |
|
Back to top |
|
|
fourhead l33t
Joined: 03 Sep 2003 Posts: 875 Location: Cologne, Germany
|
Posted: Fri Mar 11, 2005 1:07 am Post subject: |
|
|
I can recommend rsnapshot. I'm using it to backup my partitions at home and also my virtual server via ssh. I have also deployed it on a productive Samba fileserver and it's working there for months now without problems. You can restore your data by just copying it back with the regular GNU cp. What I like best is that you can keep several states of your system, the Samba server I mentioned for example keeps daily backups for 14 days, weekly backups for 3 months and monthly backups for half a year. So I could even restore the state of the server as it was half a year ago, and I could restore it like it was yesterday, last weekend, ten days ago etc. - just configure as you need & want it!
Tom |
|
Back to top |
|
|
transienteagle Apprentice
Joined: 24 Dec 2003 Posts: 190 Location: UK
|
Posted: Fri Mar 11, 2005 10:07 am Post subject: |
|
|
I'am with elektrohirn on this. I use rsnapshot for home use and also copy the latest snapshots to CD once a week. Rsnapshot is a breeze to set up (just remember that the config file is sensitive to tab's).
rgds
TE |
|
Back to top |
|
|
ReeferMac Guru
Joined: 30 May 2004 Posts: 389
|
Posted: Fri Mar 11, 2005 10:55 am Post subject: |
|
|
Thanks folks, I'll be looking into that one shortly!
Hmm... Damn. Masked on AMD64.
OK, back to the simpler idea.... is there something I can do w/ 'dd' or 'tar'? I'm concerned about a backup program running on, and backing up, a working/running system partition (I got 30 GB's, under /, and that's all there is, aside from /home (well, and swap too)). Will all the hidden, special, and active files be archivable?
Anyone care to hazard a guess as to what TAR flags I should use, if I were to boot off a knoppix or LiveCD and try from that? Is that idea even practical, or far fetched? Sorry to seem so impatient, but I've got my gentoo up and running (writing from Konquerer now!), and I want to get a working copy backed up, as I know it's only a matter of time before I screw something up royally!
- Mac |
|
Back to top |
|
|
fourhead l33t
Joined: 03 Sep 2003 Posts: 875 Location: Cologne, Germany
|
Posted: Fri Mar 11, 2005 11:13 am Post subject: |
|
|
When something is masked it does not mean that it does not work, it just means it has not yet been tested by some Gentoo dev (because he doesn't have an AMD64 for example). Just emerge it with ACCEPT_KEYWORDS="¬amd64" emerge [rdiff-backup/rsnapshot]. Both programs are only scripts and only use regular commands like rsync, diff, cp, ln etc. and you can be sure that these programs do work because you have Gentoo installed on your system right
So just go and install either one of it and test it out.
Tom |
|
Back to top |
|
|
ReeferMac Guru
Joined: 30 May 2004 Posts: 389
|
Posted: Fri Mar 11, 2005 11:30 am Post subject: |
|
|
Thanks Tom, I may give that a shot. I'm hesitant to get off the stable branch of AMD64, as I've had enough problems already, and really don't know what I'm doing! Hence the pressure felt to get a backup of the system while it's working.
If they're just scipts that call standard functions however, I think you're right, and being masked shouldn't present an issue.
Thanks for the suggestion.
- Mac |
|
Back to top |
|
|
ReeferMac Guru
Joined: 30 May 2004 Posts: 389
|
Posted: Thu Mar 17, 2005 2:00 am Post subject: |
|
|
OK, I feel I'm going to be a PIA here, but... well, ain't that what gentoo is all about?
I emerged and checked into all the rsnapshot and rsync stuff... and none of this is really what I want. I appreciate all the fancy backup-like features... I'm sure they're great. But I don't want that.
I want to simply blast, block for block, bit for bit, /dev/sda2 to /dev/sda3...
... now the idea behind this, is I'm assuming I can reverse the steps, and re-boot cleanly, should something get screwed up. I feel this is important, because it's something I should be able to do from a rescue type situation, and do so quickly... for example, if something gets really hosed, and I can't boot my box, I'm assuming I could boot to a knoppix CD, and either blast the partition back over from the 'safe' copy, or change the partition number in the GRUB boot loader....
I think in a few months, when I'm more comfortable, and have a full system running, I'll get into the Rysnc stuff, and prolly love you guy's for turning me onto it... but it's really a wee bit over my head right now. I realize it may take far more time to complete, doing it this way, the long way.... however I have time to let the computer sit and work, I don't have time to sit and learn a new backup program.
Thanks for the suggestions, I really do appreciate them. Don't mean to sound ungrateful. You folks are just a lot better at this than me. I need ya to dumb-it-down a tad.
- Mac |
|
Back to top |
|
|
lbrtuk l33t
Joined: 08 May 2003 Posts: 910
|
Posted: Thu Mar 17, 2005 3:14 am Post subject: |
|
|
If you want to just clone the whole partition you can do
Code: | dd if=/dev/sda1 of=/dev/sda2 |
Theoretically this doesn't work 100% properly and causes problems with cyliners/heads/sectors, but I get the feeling that doesn't happen anymore. I've never run into troubles doing it. |
|
Back to top |
|
|
ReeferMac Guru
Joined: 30 May 2004 Posts: 389
|
Posted: Thu Mar 17, 2005 3:37 am Post subject: |
|
|
Thanks lbrtuk,
That'll handle pipes, permissions, 'special files', and all that other fun stuff, right. I mean, dd... block by block... but it says default block size is 512... That's the kinda stuff that worries me.
- Mac |
|
Back to top |
|
|
ReeferMac Guru
Joined: 30 May 2004 Posts: 389
|
Posted: Thu Mar 17, 2005 12:21 pm Post subject: |
|
|
OK, so I tried the dd thing overnight (this is exactly the sorta simple operation I'm looking for, BTW).. It worked. I mean, the system didn't complain.
So I had some time this AM and thought I'd try my idea, of rebooting to the LiveCD, changing the paths' in grub (and /etc/fstab on the 'rescue' partition as well), and the thing got ugly. After I got all the info right (still new to grub, too), it did attempt to boot. Got partway through the boot sequence, and then when it tried mounting things, is when it got nasty. I didn't write down the exact syntax, but it was complaining about block inodes having to be equal at the begining, and matching at the end, and something about it only being able to be fixed w/ --fix tree or words to that affect. Whatever it was, I knew enough, that it was pretty serious!
OK, so my 'just boot to the b/u partition' idea isn't going to work... but can I use dd to create the backup, then through booting to the LiveCD again, simply use dd to get it back onto the correct partition, or will it barf all over the place bitching about inodes and other file system type errors again?
.... this is the stuff I was hoping to get answered for me here. I understand there's one way to find out... but like I said, I want to save this working install, not screw it up.
Thanks for the help.
- Mac |
|
Back to top |
|
|
|
|
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
|
|