Page 5 of 5 FirstFirst ... 345
Results 41 to 50 of 50

Thread: HOWTO: Create, Recover and Automate System Images

  1. #41
    Join Date
    Sep 2008
    Location
    USA
    Beans
    120
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HOWTO: Create, Recover and Automate System Images

    Quote Originally Posted by SoftwareExplorer View Post
    It seems like a pseudo-tty is the default because I logged into my backup computer and did ~. and the session closed and I was logged out of my backup computer. So my question is if there is anything that prevents a hard disk image from having something like ~ in the binary data. Would it interrupt the backup if a file had a line containing ~. by itself?

    Second, on my backup computer, I have a 1 TB drive. About 8 GB is for an ubuntu install, and the rest is a backup partition. I think I get how I would mount an uncompressed partition image, but is there a way to do that with one that is gzipped, without having to decompress the whole thing? The main reason I want to do this is to check the backups. (I heard a saying that says something to the effect of if you didn't check your backups, you didn't backup)
    I'm not sure about your second question. But if I'm understanding this entire thread about the dd utility at all:
    dd is actually writing bits (binary digit - a zero, or one - an on or off) to the drive.

    the <new-line> character that you're referring to isn't being interpreted as a break symbol on by the dd utility because the dd utility is just "moving bits", a simple sequence of zeros and ones.

    for example your computer stores an ASCII line break like this on the drive:
    Code:
    0000001010
    So I believe GrammatonCleric is saying "bit for bit" as: dd is only sending 0's and 1's:
    Quote Originally Posted by GrammatonCleric View Post
    Since DD is sending a bit for bit copy of the hard drive data to the ssh session I would think that there would not be any <newline> in the stream of data.
    Last edited by jzacsh; November 25th, 2009 at 10:29 AM.

  2. #42
    Join Date
    May 2008
    Location
    Baker, OR USA
    Beans
    887
    Distro
    Ubuntu Development Release

    Re: HOWTO: Create, Recover and Automate System Images

    Quote Originally Posted by jzacsh View Post
    I'm not sure about your second question. But if I'm understanding this entire thread about the dd utility at all:
    dd is actually writing bits (binary digit - a zero, or one - an on or off) to the drive.

    the <new-line> character that you're referring to isn't being interpreted as a break symbol on by the dd utility because the dd utility is just "moving bits", a simple sequence of zeros and ones.

    for example your computer stores an ASCII line break like this on the drive:
    Code:
    0000001010
    So I believe GrammatonCleric is saying "bit for bit" as: dd is only sending 0's and 1's:
    I was worried more about ssh seeing a ~. somewhere in the data (isn't all data, including what you type, binary) and thinking I typed it. It isn't really a pressing question; I back up with rysnc over ssh now. In fact it's more of a curiosity thing.

    Rsync is great for me because of the small time it takes to update a backup, that it handles symbolic links properly (I'm looking at you scp), and that it backs up at the file system level. That means that I can restore a single file from a backup if I need and that I can have different partition sizes when I restore.
    I don't want to Live in a Life without Walls-too many viruses get in...
    Ubuntu user 23101 Linux user 472132
    Two ways to live: the choice we all face

  3. #43
    Join Date
    Oct 2009
    Beans
    21
    Distro
    Ubuntu

    Re: HOWTO: Create, Recover and Automate System Images

    Hi all,

    First thanks a lot for this good how-to !

    I have a little question :
    What if my system has a RAID1 system mounted as / in /dev/md0 (/boot is /dev/md1) ?
    Code:
    cat /proc/mdstat
    Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
    md1 : active raid1 sdc2[0] sda2[2](S) sdd2[1]
          3976000 blocks [2/2] [UU]
          
    md0 : active raid1 sdc1[0] sda1[2](S) sdd1[1]
          308592448 blocks [2/2] [UU]
          
    unused devices: <none>
    Original backup line :
    Code:
    if=/dev/sda conv=sync,noerror | ssh user@dest "gzip -9 > /path/to/image/ubuntu_linux.img.gz"
    Should I use the RAID name :
    Code:
    if=/dev/md0 ...
    or the hard drive :
    Code:
    if=/dev/sdc ...
    Thanks in advance for your time.

  4. #44
    Join Date
    May 2007
    Location
    Sydney, Ozstrulia
    Beans
    38
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: HOWTO: Create, Recover and Automate System Images

    Quote Originally Posted by electronico_nc View Post
    Hi all,

    First thanks a lot for this good how-to !

    I have a little question :
    What if my system has a RAID1 system mounted as / in /dev/md0 (/boot is /dev/md1) ?
    Code:
    cat /proc/mdstat
    Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
    md1 : active raid1 sdc2[0] sda2[2](S) sdd2[1]
          3976000 blocks [2/2] [UU]
          
    md0 : active raid1 sdc1[0] sda1[2](S) sdd1[1]
          308592448 blocks [2/2] [UU]
          
    unused devices: <none>
    Original backup line :
    Code:
    if=/dev/sda conv=sync,noerror | ssh user "gzip -9 > /path/to/image/ubuntu_linux.img.gz"
    Should I use the RAID name :
    Code:
    if=/dev/md0 ...
    or the hard drive :
    Code:
    if=/dev/sdc ...
    Thanks in advance for your time.

    I'm also very curious about this. I too run buntu from a mdadm raid1 setup.

    /thread necromancy.

  5. #45
    Join Date
    Aug 2006
    Beans
    35

    Re: HOWTO: Create, Recover and Automate System Images

    Hi,

    I just followed this tutorial, but I'm afraid something it isn't working very good in my case.

    I have a SATA disk (/dev/sda) which has 3 partitions:

    Code:
    /dev/sda1               1        1992    15998976   82  Linux swap / Solaris
    /dev/sda2   *        1992       26891   200000512   83  Linux
    /dev/sda3           26891      121602   760761344   83  Linux
    /dev/sda2 or / is my root partition
    /dev/sda3 or /backup is my backup partition

    I use the "zero" trick to clean all space. There's currently 135 GB used data in / (without /backup folder included).

    I create a file from /dev/sda to /backup/image. But the image is becoming so large, so I'll run to the "out-of-disk-space" error. The image is now 450 GB big, but I only have 135 GB of data.

    What could be I'm doing wrong?

  6. #46
    Join Date
    Feb 2010
    Location
    Washington, DC Area
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HOWTO: Create, Recover and Automate System Images

    Thank you very much for your tutorial.

  7. #47
    Join Date
    May 2008
    Location
    Baker, OR USA
    Beans
    887
    Distro
    Ubuntu Development Release

    Re: HOWTO: Create, Recover and Automate System Images

    I would recommend making a filesystem level backup, which actually works. I usually use rsync with the -avx options (-a = archive -v = verbose -x = don't go across filesystem boundaries, so you don't try to copy things like /dev/zero).

    I usually do something like this:
    Code:
    sudo rsync -avx / /media/Backup_drive/root/
    This will store a backup of the currently running system's filesystem on backup drive in the root folder. To restore it, I do nearly the same thing from a LiveCD/USB:
    Code:
    sudo rsync -avx /media/Backup_drive/root/ /media/partition_to_restore_to/
    To restore, after you run rsync, you need to edit /etc/fstab in the restored system to reflect any changes, especially if you restore to a different partition. You also need to update grub, usually using the Chroot method listed at https://help.ubuntu.com/community/Grub2/#ChRoot
    I don't want to Live in a Life without Walls-too many viruses get in...
    Ubuntu user 23101 Linux user 472132
    Two ways to live: the choice we all face

  8. #48
    Join Date
    Sep 2011
    Beans
    1

    Re: HOWTO: Create, Recover and Automate System Images

    ^

    SoftwareExplorer, thank you for this; it came just in time.

  9. #49
    Join Date
    Jan 2007
    Beans
    73
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: HOWTO: Create, Recover and Automate System Images

    Another option for making a backup at filesystem level is fsarchiver (it's in the ubuntu repository):
    http://www.fsarchiver.org/

    For daily online backup sbackup is good, it's a really nice "fire and forget" program:
    http://sourceforge.net/projects/sbackup/
    Also in repos.

    For restoring GRUB on a new system (for the people who don't like fiddling with the chroot ):
    https://help.ubuntu.com/community/Boot-Repair
    https://launchpad.net/~yannubuntu/+archive/boot-repair

    I use sbackup for nightly backup of /home partition to another drive. fsarchiver for backing up /boot and /root partitions (both on soft raid arrays). The resulting compressed files are then transferred to removable drive, and less frequently (because of size) burned to optical media.

  10. #50
    Join Date
    Feb 2013
    Beans
    1

    Re: HOWTO: Create, Recover and Automate System Images

    Can you save this to a CD?

Page 5 of 5 FirstFirst ... 345

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
  •