Re: backup entire system

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: kitepilot@kitepilot.com
Date:  
To: Main PLUG discussion list
Subject: Re: backup entire system
Save the current checksum value of your files:
# >/tmp/files.md5
# find / -xdev \( -path /tmp -o -path /var/tmp \) -prune -o -type f \
#     -exec md5sum "{}" \; >>/tmp/files.md5 



Validate that they haven't changed:
# cd /
# md5sum -c /tmp/files.md5
(This is what the --checksum option of rsync does)
SAVE /tmp/files.md5 SOMEWHERE ELSE, most systems will cleanup /tmp on every
boot.


To "replicate your system":
Boot the boxes with a CD (Debian live works good and is lite, no "X"):
# sudo -i
# apt-get install ssh
# mount -text4 /dev/sda1 /mnt
(You'll need to create partitions and filesystems on the "other" box)
And from your box:
# rsync -vaxHXY --checksum --super / root@otherbox:/mnt

On the other box:
You'll most likely need to adjust the /etc/fstab file because most distros
use UUID and they will not match, although that's an entirely different
subject altogether.
Quick and dirty options are:
.- Build the new filesystems with the same UUID(s),
.- Change the /etc/fstab to match the new UUID(s) or,
.- use absolute devices (/dev/sda1) to mount the drives.
I think that RedHat still uses labels, which renders the same solution after
you replace "UUID" with "label".

Finally on your "other" box
(DO NOT DO THIS ON "your" BOX UNLES YOU *KNOW* what you are doing)
# grub-install /dev/sda
And now you should be able to boot your other box like your own.


Of course there are only 731598564385+1 variations and applications of the
recipe above. You have there all the information you need to "solve the
problem", now you need to "define the problem" an reshuffle the instructions
above to fit the shoe.

For more info (on EVERYTHING) go read:
http://www.linuxfromscratch.org/

Enjoy...
ET




Michael Havens writes:

> I was wondering... I wanted to clone my hard drive because I need to
> repartiton it to make it smaller. Do I really need to worry about the data
> getting corrupted? If I do need to worry about it is the data recoverable
> if something happens to it?
>
>
> On Sun, Jan 1, 2012 at 8:56 PM, Michael Havens <> wrote:
>
>> you know.... I want to clone my drive because I thought you really
>> Dec 29, 2011 at 3:55 AM, <>wrote:
>>
>>> I have cloned and restored 2464720174+1 systems with:
>>> rsync - need to vaxHXY --checksum /path1 /path2 /path3 someone@remotebox:/mybackup
>>>
>>> The 'x' constrain the sweep to a partition to avoid memory directories
>>> (/proc, /dev, /sys) which forces to explicitly name every mounted directory
>>> to copy.
>>> Then you can 'restore' with:
>>> rsync -vaxHXY --checksum someone@remotebox:/mybackup /
>>> All the options are important (except '-v'), but specially '-H' *HAS* to
>>> be there if you are cloning directories with kernel files or the resulting
>>> system will eventually become unstable.
>>> Free advise, can't sue me... :)
>>> YMMV
>>> ET
>>> PS: If you have any question,
>>> you will get any answer.
>>>
>>>
>>>
>>> Michael Havens writes:
>>>
>>>> I got things just the way I want them. How do I make a miiror image of my
>>>> hard drive? dd? Or is there a more user friendly way? I kinda want to do
>>>> it
>>>> like a raid would do it. You know.... where I would just recopy the
>>>> image
>>>> if my computer gets corrupted and it would be like the day I made the
>>>> image...... hmmmm.... google it! I found system rescue cd! (
>>>> http://www.sysresccd.org/Main_**Page<http://www.sysresccd.org/Main_Page>)
>>>> DOes this sound good? What do you all
>>>> recommend? You know, on the first page about this one of the programs is
>>>> partimage and they say that one of the limitations of it is that it does
>>>> not support ext4 filesystem. hmmmmm.... after a bit of reading me thinks
>>>> this doesn't work with ext4 even though the 'Main Page' says it does. Do
>>>> any of you know any differently?..... hmmmmm..... I've been looking but
>>>> all
>>>> of the copy programs say they support ext2 & 3 but not 4. What do you
>>>> say?
>>>> --
>>>> :-)~MIKE~(-:
>>>>
>>> ------------------------------**---------------------
>>> PLUG-discuss mailing list - .**phoenix.az.us<>
>>> To subscribe, unsubscribe, or to change your mail settings:
>>> http://lists.PLUG.phoenix.az.**us/mailman/listinfo/plug-**discuss<http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss>
>>>
>>
>>
>>
>> --
>> :-)~MIKE~(-:
>>
>
>
>
> --
> :-)~MIKE~(-:

---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss