On Wednesday 06 April 2005 06:59 pm, smertz wrote:
> I have spent a great deal of time on simple things in Linux as I am new
> over the last week (No better way to learn)  But I don't want to
> re-learn in case the proverbial Hard Drive dies, so what is a good way
> to back up my system? On my 2 Windows XP machines I use Ghost 9.  Is
> there similar thing to copy a Linux drive?
> Or can I simply do something like an XCOPY from one drive to a second
> one as a backup?
Of course!

cp -dvxpR /home/myimportantfiles /disk2/backupfolder/

Note that the x flag prevents it from crossing mount barriers so you can copy 
the root filesystem onto a disk thats mounted UNDER the root filesystem.

cp -dvxpR / /disk2/backupfolder/

A simple a quite brute force way to backup is dd ;)
If you have a hard drive thats not mounted and that is NOT your root drive (or 
even your root drive and you boot from a rescue cd) the simplest most 
effective way to image a drive is dd.

On same machine where you are saving myimagefile on another disk with enough 
space for a full image.

dd if=/dev/hda of=./myimagefile

(DO NOT DO NOT EVER MIX UP "if" AND "of" )
if = IN
of = OUT
This is where alot of sysadmins can nuke disks ;)
Know what you are saving and where you are saving it to.

You can also do cool things like run it through bzip and gzip. Personally dd 
backups and restores have a neat place when you need to image machines.Boot 
from CD and use it over SSH and the network at times for a simple brute force 
complete backup.

ssh ip.of.image.server -l loginname dd if=/home/image/computer.image | dd 
of=/dev/hda

or to save a machine over the network:

ssh ip.of.image.server -l loginname dd=/dev/hda | dd 
of=/home/image/newcomputer.image

To just capture a particular tree in a filesystem tar is quick, simple and a 
standard Unix tool.

tar -cvf mybackup.tar MyFolder
or
tar -cjvf mycompressedbackup.tar.bz2 MyFolder

Those are some quick pointers off the top of my head. Let me know if I went to 
fast or you want a particular method explained in depth. HTH!

> I am using Red Hat Enterprise Linux ES release 4 (Nahant)
> on a home Workgroup as a File and print server - If I ever get Samba set
> up correctly. Any suggestions appriciated.
>
> Thanks
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
> the body of a message to [EMAIL PROTECTED]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.linux-learn.org/faqs

-- 
----------------------------------------
--EB

> All is fine except that I can reliably "oops" it simply by trying to read
> from /proc/apm (e.g. cat /proc/apm).
> oops output and ksymoops-2.3.4 output is attached.
> Is there anything else I can contribute?

The latitude and longtitude of the bios writers current position, and
a ballistic missile.

����������������--Alan Cox LKML-December 08,2000 

----------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Reply via email to