Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 24th December 2007, 04:56 PM
tayyy Offline
Registered User
 
Join Date: Dec 2007
Posts: 6
backing up an entire hard drive

Ive used fedora 8 for around a week now and I must say i'm very impressed with it. However, it took quite a long time to configure and i'm pretty afraid of screwing something up in a manner that cannot be reversed.

Is there any package that allows you to make a complete image of your filesystem à la norton ghost that can be restored? Or is there already such a function in fedora that I am unaware of? Thanks in advance.
Reply With Quote
  #2  
Old 24th December 2007, 05:31 PM
quacked Offline
Registered User
 
Join Date: Aug 2007
Location: Reno NV.
Posts: 92
Thumbs up Bare metal restore

I've been trying to learn of a method like that myself,,,

Bacula _ one method

Backup PC _ another

Ghost4lin)_ another

dd ( a method for copying entire hard drive )

System rescue CD , _ another

Currently ,,, with the system rescue cd LVM didn't seem to be supported, or wasn't recognized ( as I remember )

Seemed to be a Command line option that would tar the entire drive ( partition tables and filesystems ) However there needed to be an ftp server to back it up to ,,, Can't remember the program <

Looked into a few methods myself,,,, ( still trying to learn them )

Bare metal restore, from an image ,,,,, Acronis also doesn't seem to support the LVM either, EXT3 is supported though,

Still have a lot to learn and try ,,, I'd like to backup my fedora 8 to an usb drive and be able to restore it from it , should the need occur,,,

Waiting to see the Posts that occur here !!!!
Reply With Quote
  #3  
Old 24th December 2007, 05:34 PM
tho.mei's Avatar
tho.mei Offline
Registered User
 
Join Date: Jun 2005
Location: St. Gallen Switzerland or Christchurch, New Zealand
Age: 28
Posts: 708
Hallo tayyy

a image of the howl filesystem is relay a overkill and not realy useful. You need just to backup the following folders:

/home
/etc
/root

Thai contains all your settings and datas. It's one of the great tings of the Unix-file-tree. Every thing has it's own place.

Care about hidden files. Their filenames start with a dot. In the home directorys are the settings of the users are hidden.

All the other folder's can be restored by a slimly installation very fast.

A trick: cerate a tra.bz2 archive of your data's, because all the security staff will be stored as well.

Marry x-mas
__________________
tho.mei
I use KDE!
Many workstions and few servers running on Fedora or Scientific Linux professionally.
Using LINUX to do some scientific 3D-stuff.
I'm RHCT

Last edited by tho.mei; 24th December 2007 at 05:37 PM.
Reply With Quote
  #4  
Old 24th December 2007, 05:43 PM
quacked Offline
Registered User
 
Join Date: Aug 2007
Location: Reno NV.
Posts: 92
http://www.linux.com/articles/113946?tid=129&tid=119

http://www.linuxjournal.com/article/4175

a site I had looked at !

Last edited by quacked; 24th December 2007 at 05:56 PM.
Reply With Quote
  #5  
Old 24th December 2007, 05:48 PM
PilotJLR's Avatar
PilotJLR Offline
Registered User
 
Join Date: Nov 2005
Location: flying a cubicle
Posts: 465
I have to respectfully disagree with tho.mei - I think image backups are very useful. Yes, it does take lots of hard drive space... that is the drawback.

Check out g4L:
http://sourceforge.net/projects/g4l

Download the iso and burn to a CD... it can backup or restore to a FTP server. I think it does USB hard disk backups too, but I personally use FTP.

Once I get a "perfect" setup on one of my laptops (only 80GB drives), then I can quickly and easily backup the whole thing. I have a laptop that is critical for my job... I image it regularly. Restores are simple and almost fool proof.
Reply With Quote
  #6  
Old 24th December 2007, 06:13 PM
mbratch Offline
Registered User
 
Join Date: May 2006
Posts: 268
Quote:
Originally Posted by tho.mei
Hallo tayyy

a image of the howl filesystem is relay a overkill and not realy useful. You need just to backup the following folders:

/home
/etc
/root
That's assuming you don't mind reinstalling any programs (or mysql databases, etc) you installed since you set up the system, which change things in various directories besides those. In that case, you want to keep a detailed diary of what you installed.

I do keep the diary in case I want to do a fresh install of the OS or of a new OS version and I want to clean house. But for the hassle-free, no work to do but restore, backup and you have the space, it's easier to back up everything (with a few exceptions, like /proc).
__________________
Mark Bratcher
http://www.codekinesis.com

Those who don't learn from history are doomed to accept the rewriting of it.

Last edited by mbratch; 24th December 2007 at 06:20 PM.
Reply With Quote
  #7  
Old 24th December 2007, 06:25 PM
JN4OldSchool Offline
"Sean The Terrible" -- The forum(er) Vista® rep
 
Join Date: Nov 2005
Posts: 8,823
why a diary? If you need to write down the program to remember it then that shows you dont ever use it and it shouldnt be on your drive anyway. Besides, it will be in the repo when/if you ever DO need it.

I agree with pilotjlr's method, but I side with tho.mei for the average home desktop user. It all just depends on your needs and the truth is it is usually better to just do a fresh install on your home desktop. The thing that people are scared of is that they will loose all those Linux "voodoo" settings that they worked so hard trying to figure out but still dont quite understand. But it is BECAUSE of this that they SHOULD do a fresh install. So they LEARN how to do this stuff. Especially in Fedora where it is fast paced and you reinstall every six months anyway. Debian is a little different and I can understand that. Look, with a backup of a few .config files i can have a fresh install up and running in 1/2 hour. Within 3 hours I will be updated with all my apps installed. It really is not a major deal, especially when compared to Windblows where you go on the driver hunt then the program hunt then spend a day copying product keys off CD cases you cant find...Just my 2¢ anyway, you are welcome to disagree...
Reply With Quote
  #8  
Old 24th December 2007, 06:35 PM
tho.mei's Avatar
tho.mei Offline
Registered User
 
Join Date: Jun 2005
Location: St. Gallen Switzerland or Christchurch, New Zealand
Age: 28
Posts: 708
Hallo
Quote:
why a diary?
If you are use yum ore a tool how bases on yum, the diary is all redy on your system: see /var/log/yum.log

Quote:
That's assuming you don't mind reinstalling any programs (or mysql databases, etc) you installed since you set up the system, which change things in various directories besides those. In that case, you want to keep a detailed diary of what you installed.
If you are ruing a server you will need to store a bit more. But sill no reason for a howl system image.
__________________
tho.mei
I use KDE!
Many workstions and few servers running on Fedora or Scientific Linux professionally.
Using LINUX to do some scientific 3D-stuff.
I'm RHCT
Reply With Quote
  #9  
Old 24th December 2007, 06:44 PM
quacked Offline
Registered User
 
Join Date: Aug 2007
Location: Reno NV.
Posts: 92
Quote:
Originally Posted by Jn4Oldschool
So they LEARN how to do this stuff. Especially in Fedora where it is fast paced and you reinstall every six months anyway. Debian is a little different and I can understand that. Look, with a backup of a few .config files i can have a fresh install up and running in 1/2 hour. Within 3 hours I will be updated with all my apps installed



Even with the apps, there are still file permission settings, user and directory write permissions and all the other permissions that may have been altered , in order to get most of the other apps to work ,, " properly " with the MYSql databases and web server site, Let alone the users, of a server,, How to backup a server , with those permissions , configured for a fresh install is what I'd like to know how to do,,,
Reply With Quote
  #10  
Old 24th December 2007, 06:48 PM
SlowJet Offline
Registered User
 
Join Date: Jan 2005
Posts: 5,016
I LVM SELinux



# lvcreate --size 4G --snapshot --name /dev/VolGroup71/snaproot /dev/VolGroup71/LogVol71root
# lvcreate --size 4G --snapshot --name /dev/VolGroup72/snaphome /dev/VolGroup72/LogVol72home
# mount /dev/VolGroup72/LogVol725x4 /mnt/BKUPS
# mount /dev/VolGroup72/snaphome /mnt/snaphome
# mount /dev/VolGroup71/snaproot /mnt/snaproot
cd /mnt/BKUPS/tararchives

# tar -cj -f bkuproot711221.bz2 /mnt/snaproot -P --preserve --xattrs --totals -b32
# tar -cj -f bkuphome721221.bz2 /mnt/snaphome -P --preserve --xattrs --totals -b32 --exclude=*.iso --exclude=*.vdi
# tar -cj -f bkupboot711221.bz2 /boot -P --preserve --xattrs --totals -b32
# umount /mnt/snaproot
# umount /mnt/snaphome
# umount /mnt/BKUPS
# lvremove /dev/VolGroup71/snaproot
# lvremove /dev/VolGroup72/snaproot

SJ
__________________
Do the Math
Reply With Quote
  #11  
Old 24th December 2007, 06:53 PM
JN4OldSchool Offline
"Sean The Terrible" -- The forum(er) Vista® rep
 
Join Date: Nov 2005
Posts: 8,823
Quote:
Originally Posted by quacked
Even with the apps, there are still file permission settings, user and directory write permissions and all the other permissions that may have been altered , in order to get most of the other apps to work ,, " properly " with the MYSql databases and web server site, Let alone the users, of a server,, How to backup a server , with those permissions , configured for a fresh install is what I'd like to know how to do,,,
OK, so follow pilotjlr's link. There is also a thread working called "system restore" that has some ideas. Just remember that not everyone does the same things you do. For me, my simple server configurations are a no-brainer, as it is a home network I dont have any permission problems that even bear thinking about. My different users (family members) each have their own computer with their own install so this isnt a problem. My point was directed more at the OP. Go back and read the first post of this thread. I am not saying that backups, even full system backups, are a dumb idea or should never be done. What I did say was it depends on your needs and I am finding that people in this forum are worried about full backups for the wrong reasons. There are simply easier and better ways.
Reply With Quote
  #12  
Old 24th December 2007, 07:26 PM
Brian1's Avatar
Brian1 Offline
Registered User
 
Join Date: Nov 2004
Location: Seymour, Indiana
Posts: 2,509
If the system is not needed 100 percent of the time i would get a USB drive or a second internal drive and mirror it using ghost4linux.

Brian
__________________
Distribution: RHEL 5.1 with Pieces of this and that.
Kernel 2.6.23.9, KDE 3.5.8 and KDE 4.0 beta, Plus Development src.rpm, ATI fglrx64_7_1_0-8.433-1 rpm with 3D and DRI working.
Acer 5100-5840 with webcam, ati, sdcard reader, sound, atheros based wireless, all working. Only thing not working is the memory stick reader.
Reply With Quote
  #13  
Old 24th December 2007, 07:34 PM
mbratch Offline
Registered User
 
Join Date: May 2006
Posts: 268
Quote:
Originally Posted by JN4OldSchool
why a diary? If you need to write down the program to remember it then that shows you dont ever use it and it shouldnt be on your drive anyway. Besides, it will be in the repo when/if you ever DO need it.
Well, I have all sorts of stuff installed and set up on my system including databases, and ruby scripts, various configurations, all set up a certain way. I write it all down so I don't have to remember all of it. It's not a very big diary, but it helps a lot.
__________________
Mark Bratcher
http://www.codekinesis.com

Those who don't learn from history are doomed to accept the rewriting of it.
Reply With Quote
  #14  
Old 24th December 2007, 10:47 PM
stevea's Avatar
stevea Offline
Registered User
 
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,346
Quote:
Originally Posted by tho.mei
Hallo tayyy

a image of the howl filesystem is relay a overkill and not realy useful. You need just to backup the following folders:

/home
/etc
/root

Thai contains all your settings and datas. It's one of the great tings of the Unix-file-tree. Every thing has it's own place.

Care about hidden files. Their filenames start with a dot. In the home directorys are the settings of the users are hidden.

All the other folder's can be restored by a slimly installation very fast.

A trick: cerate a tra.bz2 archive of your data's, because all the security staff will be stored as well.

Marry x-mas

tho.mei has a bad habit of teling people to do someting else, rather than answering their questions.
The poster did NOT ask for a method to backup up personal files and configs and tho'mei's method is incomplete.

I generally agree with Tho.Mei's idea, that it isn't necessary to save all the Fedora packages since they can be re-installed easily BUT THAT WAS NOT THE QUESTION ! Tho'Mei's answer is incomplete - you will also need localized files from /boot and any other partition as well. The only thourough way to implement this approach is to query every file against the rpm database and backup every file that does not belong to a package or has been modified since package install. Then you can eliminate the obvious klinkers (/dev, /proc, /etc/rc[0-6].d/[KS]*). No it is not trivial to save all the config files and even less trivial to restore from a copy of /etc for example. You cannot simply copy a modded pam policy on top of a newer version so you' d need to sort through the thousand changed files in /etc and manually mess with each one. That's a crummy approach.

I suggest that you immediately start a "localization" file that contains all the little tweaks and tricks you applied to make your system homey. This can be part text and part shell script if you like. Then the NEXT time you install you can complete (and update) the localization directio0n and then you'll have a nice pattern for all the things you need.
"#Install fedora office profile
yum -y nautilus-terminal ntfs-3g .....
add ".... ." to /etc/fstab.

A few pages will show all the work necessary re-create your system. That and the personal file tontents like /home, /root and perhaps /opt and wherever you store your emails address books, bookmarks ...;; but you should know where these are kept.

====
Now to the ORIGINAL question:

*IF* you want to make a full drive backup then there are several things to consider.

You should note that on (for example) a 40GB partition /dev/sda1 with a half-filled (roughly 20GB) ext3 file system that all of the unused blocks (the unallocated 20GB) contain random scribbles, so *IF* you back up the raw partition (/dev/sda1) of the raw disk (/dev/sda) then you will be backing up a lot of unecessary info and it is not generally very compressible, You're compressed image of /dev/sda1 will be well over 20GB typically.

If instead you backup the file system (say "tar -c --selinux -pjf /backup/root.img.tar.bz2 / ") then you will only backup the files and their permissions and selinux context in a compressed mode, so the result will typically be under 20GB.

When you backup the files (with tar for example) you have lost all the partition information, and you have lost all the info NOT in a file system and you have lost all the file-system information. This is acceptable so long as you can reconstruct it.. We don't care a lot about the data on the swap partiition but we do greatly care about the MBR and partition tables and boot loader code.

Backup the partition table and stage 1 grub ...
dd if=/dev/sda bs=512 count=32 of=/backup.MBR_BOOT.img
Can be restored with dd if=/backup.MBR_BOOT.img of=/dev/sda

Collect the file system info:
fdisk -l /dev/sda
Can be restored with manual mkfs commands or the use of gparted-live CD (highly recommended).

Then each file system should have it's file contents and context and perms backed up:
tar -c ---selinux -pj--one-file-system f /backup/root.tar.bz2 /
tar -c ---selinux -pj--one-file-system f /backup/home.tar.bz2 /home
.... and so on for each file system (assumes you have a separate /home)
restore in the obvious way.

===

Yes it's not sweet and clean.



-S
Reply With Quote
  #15  
Old 25th December 2007, 12:46 AM
tayyy Offline
Registered User
 
Join Date: Dec 2007
Posts: 6
wow thanks a lot guys.
Reply With Quote
Reply

Tags
backing, drive, entire, hard

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CD drive slowing entire system Fishonadish Hardware & Laptops 1 5th April 2008 12:17 PM
entire hard disk is formatted as type ext3 and i am unable to install XP now fedorized_111 Installation and Live Media 8 3rd April 2008 10:01 PM
backing up data to external hard drive slade17 Using Fedora 22 25th January 2007 11:47 PM
backing up a hard drive iamroot Using Fedora 6 13th August 2006 11:25 AM
Backing up hard drive as a disk image Kobnar Using Fedora 5 20th April 2006 03:54 PM


Current GMT-time: 06:38 (Tuesday, 18-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat