Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Efficient System Backups

  1. #1

    Default Efficient System Backups

    Hi,

    My OpenSUSE setup has become quite complex and so I would like to back it up in order to shorten the time it takes to restore from backup and get the system running. I already have an excellent way to back my data (documents, photos, downloads, etc), so this need not be a solution for those.

    What I want to be able to restore is:
    - Operating system (Using 11.2 64bits)
    - System settings (Things like the /etc/hosts file, services, apache2 setup)
    - Applications (Most installed through Yast, some from RPM and scripts from tar/gz files)
    - Application settings (things in /home/<username/.* for example)
    - Virtual machine for Parallels

    What I care about is restoring my exact configuration efficiently. I do not mind not having every binary to do it stored. So I'm thinking something like this:
    - Installation of the OS from the DVD media.
    - Have a list of all packages on my system and a way to install/download all the needed ones and remove the unneeded ones.
    - Apply system configuration, basically all changed files from the point there were installed (except for logs)
    - Apply application configuration.

    I expect to need different software to do this, so if you know even how to implement one of the above, please let me know.

    Thanks in advance,

    - Itai
    Digital Camera Buying Guide, Photography Articles and Reviews | NeoCamera.com

  2. #2
    Join Date
    Mar 2008
    Location
    Bochum, Germany
    Posts
    3,587

    Default Re: Efficient System Backups

    * idanan,

    easy, yet disk space consuming method: Make images of your system.
    Rather easy, not so powerful method: Yast's Backup
    http://en.opensuse.org/YaST_System_Backup

    Else we are talking about professional backup solutions where you have to know well what ypu do. Check bacula: http://www.bacula.org

    Uwe

  3. #3

    Default Re: Efficient System Backups

    Very easy method if you have enough spare disk space, on an external disk for example, and your system is partitioned well so the system is seperate from your data.

    Simply using rsync -Sax, can update a copy of / filesystem. Repeat if you have /boot, /var or /usr seperate.

    Then should you need to replace internal hard disk, you can simply copy it back, then you can run CD/DVD (Live or installer) and YaST Bootloader module to reinstall GRUB, should you require baremetal recovery.

    A 8 or 16 GiB flash drive is an inexpensive and convenient backup solution for the whole system partition.

  4. #4
    Join Date
    Dec 2008
    Location
    Sydney, Australia
    Posts
    1,020

    Default Re: Efficient System Backups

    There are many easy solutions to backing up /home but that's not your problem.

    To backup /etc/, /var and all that you need root privileges but most common backup apps - even the simple ones like BackinTime, fwbackups etc - can easily be run as root.

    To backup the entire system for a "bare metal restore", you need something like Clonezilla or another disk mirroring rather than file backup application.
    Günter

    Desk: Leap 42.2, KDE 5, Intel i3, 8Gb, Kingston 64Gb SSD, 2 SATA.
    Lap: Thinkpad T430, Tumbleweed, Intel i5, 8Gb, SSD.

  5. #5

    Default Re: Efficient System Backups

    Thanks for all the replies. I'll be trying them out and go from there!

    - Itai
    Neoluminance | Fine Art Photography

  6. #6

    Red face Re: Efficient System Backups

    It's me again

    All the solutions proposed are quite good. I particularly like the simplicity of using rsync since I use a combination of removable drives and DVDs for my data backups anyways.

    Now, I'd like to plunge a bit further into system backups. All the answers given cover the case of a hard-drive failing or corrupting, because the system restored should work 100% as the old one once the hard-drive is replaced, even if the exact size is not the same.

    Another scenario I'd like to look at is the case where I must restore my backups on a different system. Say the system gets stolen or burns, or gets otherwise destroyed... It won't be possible to get the same hardware if it is more than 2 or so years old, so I have to be able to get up and running as fast as possible on a possible different system.

    Now, as I said before, I know how to get my data back efficiently, it is the "system" I'm consdered, although in such scenario it will most likely different. What still needs to be restored is all the packages (system or apps) and their configuration (generated via config options or edited manually).

    How would one do this kind of thing?

    Is there a way to export the list of packages from the system and list of modified configuration files? And a way to take a new fresh OpenSUSE install and give it this list and the modified files (as diffs most likely) to produce a system as close as possible to the original one? It should work with any config I've edited like the hosts file, apache config and service started status, etc.

    Thanks in advance,
    - Itai
    http://www.cybernium.net

  7. #7
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,582

    Default Re: Efficient System Backups

    rpm -qa --queryformat '%{NAME} '

    Will list all packages installed by Yast/RPM. Any you installed by compiling they won't be in the list.

    rpm -qa --queryformat '%{NAME} ' > rpm.bak

    will write this list to a file called rpm.bak

    You can then use this list to restore on a fresh system.

    zypper install $(cat rpm.bak)

  8. #8
    Join Date
    Dec 2008
    Location
    Sydney, Australia
    Posts
    1,020

    Default Re: Efficient System Backups

    Quote Originally Posted by idanan View Post
    Is there a way to export the list of packages from the system and list of modified configuration files? And a way to take a new fresh OpenSUSE install and give it this list and the modified files (as diffs most likely) to produce a system as close as possible to the original one? It should work with any config I've edited like the hosts file, apache config and service started status, etc.

    Thanks in advance,
    fwbackups writes a list of rpms to a text file automatically.
    Günter

    Desk: Leap 42.2, KDE 5, Intel i3, 8Gb, Kingston 64Gb SSD, 2 SATA.
    Lap: Thinkpad T430, Tumbleweed, Intel i5, 8Gb, SSD.

  9. #9

    Default Re: Efficient System Backups

    Quote Originally Posted by idanan View Post
    ...
    Another scenario I'd like to look at is the case where I must restore my backups on a different system. Say the system gets stolen or burns, or gets otherwise destroyed... It won't be possible to get the same hardware if it is more than 2 or so years old, so I have to be able to get up and running as fast as possible on a possible different system.
    ...
    You can always make an image of a partition, and restore that to a like-sized partition on another drive. dd and gzip are the relevant commands. Factors to consider: the partition image files take up space; and the imaged partition should be unmounted. But, disk space is too cheap these days to worry about, and you should have a bootable cdrom around anyway.

    I use Puppy Linux, and keep a few / and /home partition image files around.

    Hope this helps.

  10. #10

    Default Re: Efficient System Backups

    Quote Originally Posted by gminnerup View Post
    To backup the entire system for a "bare metal restore", you need something like Clonezilla or another disk mirroring rather than file backup application.
    No that is not true! You simply need a copy of all the files, and then re-install the GRUB map file (needed to find filesystem specific stages) so you can boot.

    Otherwise simply using cp -ax & rsync -ax would not be able to move the / filesystem. It is when moving /boot with GRUB or lilo files in it, where extra step is required.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •