Page 1 of 6 123 ... LastLast
Results 1 to 10 of 53

Thread: Creating bootable loopmounted backups using Bubakup

  1. #1
    Join Date
    Mar 2006
    Location
    Palo Alto, CA
    Beans
    1,226
    Distro
    Ubuntu 12.04 Precise Pangolin

    Creating, booting, and restoring bootable full-system backup images using Bubakup

    Main site, downloads, and a more detailed, screenshot-based guide are at http://lubi.sourceforge.net/bubakup.html

    Introduction

    Bubakup, the Bootable Ubuntu Backup, is a tool that allows you to create a bootable backup image of your running system. It supports creating uncompressed, bootable loopmounted disk images of the whole or parts of the system, deleting backup disk images, archiving backup disk images using 7-zip, restoring backed-up archived disk images, and LVPM (which is pre-installed in the generated disk images) can be used to restore the backup loopmounted disk image to an actual partition.

    Usage Cases

    The bootable disk images created by Bubakup can be used as an emergency recovery and restoration tool, should your primary system become unbootable. It can also be used as a sandbox environment for testing bleeding-edge and unstable code, in an environment that is the same as though you were using your primary system, without harming your primary system. It can also be used as a general full system and data backup/restoration utility.

    What it does

    A loopmounted disk image of the size selected by the user is created on the partition selected by the user, and the contents of the currently running root partition, excluding directories selected by the user, are copied into it. The loopmounted disk image is then patched and modified with loopmounting patches to allow it to boot. A menu entry is then added to grub allowing for the booting of the loopmounted disk image. The user can then reboot into the bootable backup disk image and restore it to a partition using LVPM, archive the disk image and later restore it, or delete the bootable backup if it is no longer needed.

    Requirements


    This has been tested on Ubuntu 7.04 (Feisty) 32-bit, and Ubuntu 7.10 (Gutsy) 32-bit, though it may also work on other versions. Dependencies include os-prober, p7zip-full, and ntfs-3g, though these are automatically resolved when installing the deb package.

    Credits

    This guide and the Bubakup and LVPM applications were created by me, Geza Kovacs. The currently used loopmounting patches are from the Lupin component of the Wubi Project, though Ubuntu 7.10 (Gutsy)'s built-in loopmounting code will be used once it is released.

    Instructions

    If you prefer a graphical, screenshot-based tutorial, see the main site at http://lubi.sourceforge.net/bubakup.html otherwise, follow the instructions below:

    Installation

    Download the package file (deb) at http://sourceforge.net/project/showf...roup_id=198821 and install it. You will then be able to run Bubakup by clicking Applications -> System Tools -> Bubakup

    Creating a bootable backup

    Start Bubakup, and select the "Create a backup" option.

    A dialog will then prompt you to specify a partition to save the backup to; select a partition and click OK.

    The next dialog will tell you how much disk space will be needed by your backup, and if you want to exclude any directories from the backup, select the "Exclude more directories" option and specify the directory. Once you have excluded all the directories you would like to, select "Continue On".

    The next dialog will then prompt you how large you would like to make the loopmounted bootable backup disk image, in MB. The minimum value should be enough if you are only using it as a backup/restore/rescue system, but if you aim to install additional software or store additional files on the backup image, for sandboxed testing or other purposes, you may want to give it more space (but remember to not go over the amount of free space on your hard drive). Once you have selected a value, click OK to proceed.

    The backup process will then begin, and may take a long time (an hour or more), depending on how much data you backed up and your drive performance.

    Once the "Backup Complete" notification appears, you can reboot and select the last option in the menu list, "Bubakup", to boot the bootable backup disk image.

    Restoring a bootable backup to a partition

    If you have a spare partition to restore to, or are willing to overwrite one, you can continue on; otherwise, you will need to shrink an existing partition and create a new one. If you don't have a livecd, you can use the Partition Manager tool at http://sourceforge.net/project/showf...roup_id=198821 to resize your partitions (just install the deb package, boot it, and start GParted), or if you have a live CD, you can use GParted.

    Once you have a partition to restore to, boot the bootable backup, and start LVPM at Applications -> System Tools -> LVPM, select "Transfer install to a dedicated partition", select the free partition to restore to, wait as it restores, and you can boot into your newly restored system. A more detailed guide is at http://lubi.sourceforge.net/lvpm.html

    Archiving a bootable backup

    If you archive a bootable backup and remove the original bootable disk images, you will be unable to directly boot it until you restore the backup. The archiving feature is primarily used for the purpose of saving disk space, and should be used only on older backup disk images that you won't have to boot anytime soon. To archive a bootable backup, start Bubakup (from the primary operating system, not the bootable backup), and select the "Archive existing backup option.

    A dialog will then prompt you to select the partition in which the bootable backup disk image you wish to archive is stored in. Select the partition and click "OK".

    The next dialog will then allow you to specify which directory you want to save the backup image in. Select a directory and click OK.

    The next dialog will then ask how much compression to use, on a scale of 1 to 9. The higher the value, the smaller the file will be, though the time it takes to create the backup will drastically increase.

    The archiving process will then begin, and the disk image will be compressed using 7-zip. The process may take over an hour, depending on the size of the original bootable backup disk image and the compression setting you selected. Once it is done, a text dialog will appear.

    Restoring a bootable backup disk image.


    Once you restore a bootable backup disk image from an archive, you will be able to once again boot the loopmounted disk image. To restore, first start Bubakup, and select the "Restore a backup from archive"

    A file-selection dialog will then allow you to select the archived backup file (7z extension) to restore from. Select the file and click OK.

    The next dialog will then allow you to select the partition to which the archived loopmounted backup disk image should be restored to. Select the partition and click OK.

    Then wait as the compressed bootable backup disk image is uncompressed into the selected partition/bbk-$date subdirectory, and the grub menu entries are added to allow for booting from the loopmounted backup disk image.

    Deleting bootable backup images, undoing changes, and uninstalling

    Start Bubakup (from the primary operating system, not the bootable backup), and select the "Delete existing backup" option.

    A dialog will then prompt you to select the partition in which the backup is stored; select the partition and click OK

    The next dialog will then list the bootable backups stored on the partition; select the backup you want to delete and click "OK"

    The backup will then be deleted, and the GRUB menu entry will be removed.

    If you want to remove Bubakup itself, just remove the package "bubakup" using Synaptic.
    Last edited by tuxcantfly; September 12th, 2007 at 09:18 AM.

  2. #2
    Join Date
    Mar 2006
    Location
    Palo Alto, CA
    Beans
    1,226
    Distro
    Ubuntu 12.04 Precise Pangolin

  3. #3
    Join Date
    Aug 2007
    Location
    Newcastle, UK
    Beans
    Hidden!
    Distro
    Gutsy Gibbon Testing

    Re: Creating bootable loopmounted backups using Bubakup

    Nice howto. I am planning to install another hard drive for my root ubuntu installation. I think this will do the trick quite nicely
    Last edited by DemoN3x; August 29th, 2007 at 04:56 AM.

  4. #4
    Join Date
    Mar 2006
    Location
    Palo Alto, CA
    Beans
    1,226
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Creating bootable loopmounted backups using Bubakup

    Quote Originally Posted by DemoN3x View Post
    Nice howto. I am planning to install another hard drive for my root ubuntu installation. I think this will do the trick quite nicely
    Well if all you want to do is copy over a partition, using this would be overkill (it would take 2 steps; backup to disk image, then restore the disk image to a partition); I'd just use the GParted copy partition function to do the job, though of course, this would be useful if you wanted to keep a backup disk image, and testers are always welcome...

  5. #5
    Join Date
    Aug 2007
    Location
    Newcastle, UK
    Beans
    Hidden!
    Distro
    Gutsy Gibbon Testing

    Re: Creating bootable loopmounted backups using Bubakup

    I plan to do quite a bit of messing around so would like to keep a backup for when I screw it up

  6. #6
    Join Date
    Feb 2006
    Beans
    65

    Re: Creating bootable loopmounted backups using Bubakup

    I have some doubts about the fundamental working of this program, namelly the storage of bootable backup images.

    I read that they are stored in a partition. Does that partition require a filesystem and mounting? If not, does a single backup image use up all of the partition? And if so, why are they called images if they are a partition backup onto another partition? I thought "image" was the word you used when the content doesn't match the form, as in storing a partition in a file which will reside in a filesystem over another partition.

    Can this program be used live? As in backup the running root partition? That is a step ahead of partimage and very interesting on its own. In my humble opinion, more interesting that the whole "bootable" property of such backup images. How is this step accomplished? Can it be separated from Bubakup?

    Thank you for your replies.

  7. #7
    Join Date
    Feb 2006
    Beans
    65

    Re: Creating bootable loopmounted backups using Bubakup

    (subscribing - sorry)

  8. #8
    Join Date
    Mar 2006
    Location
    Palo Alto, CA
    Beans
    1,226
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Creating bootable loopmounted backups using Bubakup

    Quote Originally Posted by KubuntuKilledMe View Post
    I have some doubts about the fundamental working of this program, namelly the storage of bootable backup images.

    I read that they are stored in a partition. Does that partition require a filesystem and mounting? If not, does a single backup image use up all of the partition? And if so, why are they called images if they are a partition backup onto another partition? I thought "image" was the word you used when the content doesn't match the form, as in storing a partition in a file which will reside in a filesystem over another partition.

    Can this program be used live? As in backup the running root partition? That is a step ahead of partimage and very interesting on its own. In my humble opinion, more interesting that the whole "bootable" property of such backup images. How is this step accomplished? Can it be separated from Bubakup?

    Thank you for your replies.
    I think you misread the information. They are NOT stored in a partition, but rather in a file in a partition. That's why it's called a "loopmounted partition". I also refer to it as a "disk image" because loopmounted partitions are rather similar to .iso files (CD disk images), the only difference is the filesystem format; iso files are iso9660 format and these loopmounted partitions are ext3 format, but the fact that they are files containing a filesystem within themselves residing as files in another filesystem. So yes, your description "storing a partition in a file which will reside in a filesystem over another partition" is exactly what a loopmounted partition is; this program does NOT need its own partition to store each backup, it stores them in disk images.

    The only reason the user is prompted to select a partition to save the backup to (which is what I assume led you to this conclusion) is because the booting mechanism for the disk images requires that the disk images reside in a folder in the top level of a filesystem, so a partition selector is used instead of a folder selector because the user would only have 1 folder on each partition (/bbk$date) to which the disk images can be saved to, so that's used simply to simplify the interface and for usability; however, the partition selected is not formatted or destroyed in any way; the new folder (/bbk$date) is simply created in the root directory of the selected partition and the disk images are stored within the directory.

    And yes, the program can be used "live" (backup the running root partition). The step is accomplished by using rsync; if you need the specific commands and steps, just search through the source code at https://launchpad.net/bubakup for the "rsync" command.
    Last edited by tuxcantfly; August 30th, 2007 at 06:16 PM.

  9. #9
    Join Date
    Feb 2006
    Beans
    65

    Re: Creating bootable loopmounted backups using Bubakup

    Thank you for your reply. It really wasn't making sense the way i first interpreted it. In light of it i have a couple more questions:

    You mention a "booting mechanism for the disk images requires that the disk images reside in a folder in the top level of a filesystem". What other requirements does the booting mechanism have? Namelly what filesystems are supported for the backup storage partition? NTFS?

    I'm thinking that since i run dual boot with WinXP, using 2 hard drives, i could backup my small Linux root into the windows hard drive (with Bubakup and the new writable ntfs support) and backup the windows drive into the Linux disk (trivial with partimage). With exclusions to eliminate the obvious recursion problem.

    Finally, can you backup the running root into itself, assuming enough free space?

  10. #10
    Join Date
    Mar 2006
    Location
    Palo Alto, CA
    Beans
    1,226
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Creating bootable loopmounted backups using Bubakup

    You mention a "booting mechanism for the disk images requires that the disk images reside in a folder in the top level of a filesystem". What other requirements does the booting mechanism have? Namelly what filesystems are supported for the backup storage partition? NTFS?
    NTFS, FAT32, ext3, ext2, reiserfs, xfs, jfs (note that with FAT32 the backup can't be any more than 4 GB due to FAT32 size limitations)
    Finally, can you backup the running root into itself, assuming enough free space
    yes
    I'm thinking that since i run dual boot with WinXP, using 2 hard drives, i could backup my small Linux root into the windows hard drive (with Bubakup and the new writable ntfs support) and backup the windows drive into the Linux disk (trivial with partimage). With exclusions to eliminate the obvious recursion problem.
    yes

Page 1 of 6 123 ... LastLast

Bookmarks

Posting Permissions

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