Backup System Using An External USB Hard Drive

Discussion in 'Linux' started by rbil, Oct 4, 2008.

  1. rbil

    donec

    Joined:
    Sep 11, 2008
    Messages:
    952
    Likes Received:
    0
    Do I need to download the image also or just the script?
     
    donec, Oct 6, 2008
    #21
  2. rbil

    rbil

    Joined:
    Aug 14, 2008
    Messages:
    730
    Likes Received:
    0
    Location:
    The Wet Coast, Canada
    Just the script. 7k file.

    Cheers.
     
    rbil, Oct 6, 2008
    #22
  3. rbil

    donec

    Joined:
    Sep 11, 2008
    Messages:
    952
    Likes Received:
    0
    OK! Here is what I did. I used the script to make a backup of my SDHC disk. Then I opened some tabs in my browser and closed it so they would be in my session, then I made a direct copy of my home partition. At this point I restored the SDHC partition from the backup I made using the script you made. When I rebooted everything worked perfectly and the tabs that I had opened did not show up when I opened my browser proving the files on the SDHC card were overwritten. Then I replaced my browser profile and the tabs were now there. All this proves to me beyond a doubt that your script works for Onelinux on the Acer Aspire One and should work for any Ubuntu version and probably any Debian distro.

    You Rbil are the King and I send you all my thanks and appreciation.

    Now I need to try the restoration of the SSD. I am quite sure it will also work perfectly.
     
    donec, Oct 6, 2008
    #23
  4. rbil

    donec

    Joined:
    Sep 11, 2008
    Messages:
    952
    Likes Received:
    0
    I just tried to do a restore of the backup of the SSD I did the other day and I got a message that said file not found. Then I did another backup and restored that new backup and it worked fine. To me either something in the new script changed making the old backup not work or I did something wrong making my original backup (which may very well be). But just in case I thought I would mention it and let you look into it.

    Now I have 3 folders in my larger / second partition your script created. They are "Backup", "sdcard", and "ssd1". The ssd1 folder is empty but the other folders have 2 items each in them. The backup folder has "hdimage.gz.aa" and "hdimage.gz.ab" while the sdcard folder has "sdpart1.gz.000" and "sdpart1.gz.001". Now what I want to know is:

    1. Do I need to keep the empty folder ssd1?
    2. Can move the files and folders and then at a later date replace them or do they have a special location on the hard drive like some Windows files?
    3. I want to place the files on DVDs for storage and to have a basic backup to rely on then make more backups as time goes by. Is there anything about this backup process that would interfere with this idea?
    4. Now that I have the external hard drive working with this script can I change the size of the second partition and add other partitions for other stuff and the script still work? I have already found I can't resize the first partition.

    Thanks again for your work.
     
    donec, Oct 7, 2008
    #24
  5. rbil

    rbil

    Joined:
    Aug 14, 2008
    Messages:
    730
    Likes Received:
    0
    Location:
    The Wet Coast, Canada
    This is what will be stored in each of those directories on your large FAT32 partition:

    /Backup - stores a full backup of a SSD drive, a complete backup (option 1 in the script)

    /ssd1 - stores a backup of the ext2 partition on the SSD drive (option 3 in the script)

    /sdcard - stores a backup of the first partition on the SD drive in the LEFT slot of the AAO (option 5 in the script)

    Now that storage is explained, I'll answer your questions:

    1) doesn't matter if you keep it or not. it will be recreated the next time the backup script is run, so that it's there should you want to backup just the ext2 partition on the SSD drive. You may as well leave it there.

    2) you can move them if you like and replace them later should you want to do a restore from any of them. But as in 1 above, if they aren't there, those directories will be automatically created when you run the backup script again. But of course those directories will be empty until you actually do one of the backups.

    3) No. It's just that when it comes time to restore any of the specific backups, you'll want the right files in their respective directories.

    4) You should be able to resize the last partition on the hard drive and create another one. As far as I can think, this shouldn't be a problem. To the sysrescuecd system another partition will be /dev/sdb3 and that shouldn't impact the backups/restores. Just make sure you leave the large FAT32 partition big enough to accommodate all those backups.

    Regarding this statement:

    You did nothing wrong. The new script has changed as pointed out in the blog, so that backups of SSD (complete backups of that drive) are now broken into 2GB file sizes. The new script was simply looking for a different filename than what the old script looked for. As pointed out in the blog, one should do a complete backup of the SSD drive using the new script.

    Glad to hear it's all working for you. Thanks for reporting back.

    Cheers.
     
    rbil, Oct 7, 2008
    #25
  6. rbil

    Burroughs

    Joined:
    Oct 4, 2008
    Messages:
    13
    Likes Received:
    0
    First of all, I'd like to thank rbil for this useful script.
    Anyway, I'd like to ask a question: since I've purchased the HDD edition of the Acer Aspire One, don't think I can use the script; in fact, I'm just using partimage to clone the / (root) partition of the hard drive.
    Well, rbil, that's my question: are you thinking about releasing a new edition of your script to support all the people who didn't buy the SSD edition of the AAO?

    Burroughs.
     
    Burroughs, Oct 7, 2008
    #26
  7. rbil

    rbil

    Joined:
    Aug 14, 2008
    Messages:
    730
    Likes Received:
    0
    Location:
    The Wet Coast, Canada
    I just don't know how the hard drive is seen by the system. Is there Linpus installed on your hard drive or is it Windoze? If you could give me details, it's possible that the script could be easily modified (if it won't already work as is) to accommodate backing up the hard drive. With the hard drive version, is there only one partition on the hard drive and when using partimage, is it recognized as /dev/sda for the whole hd and is that partition on it /dev/sda1? It might be that a boot in sysrescuecd would see the device as /dev/hda ??? What you could do to find this all out is to download the image file that I provide for "burning" a 4GB external drive. Then after preparing a 4GB flash key, keeping the original as is. Don't add a new script. Boot from that drive and you'll get to a command prompt. Running: fdisk -l will give us all the details we need to know, as to what sysrescuecd sees about the hard drive on your system. Then it'll be easy to modify a script to handle it.

    Cheers.
     
    rbil, Oct 7, 2008
    #27
  8. rbil

    donec

    Joined:
    Sep 11, 2008
    Messages:
    952
    Likes Received:
    0
    Thanks Rbil. I now understand better about what is going on and why the ssd1 folder is there. Your script makes the AA1 an even more valuable position since it makes it so easy to experiment with things as you can so easily backup and restore your system without loosing anything.
     
    donec, Oct 7, 2008
    #28
  9. rbil

    Burroughs

    Joined:
    Oct 4, 2008
    Messages:
    13
    Likes Received:
    0
    Hi again...
    If I launch cfdisk on my shell, the output I get says there's a /(root) partition, /dev/sda1, and a swap file, /dev/sda2.
    Nothing else.
    What I'm doing right now is to use systemrescue and partimage to make a clone of the root partition.
    Cheers,

    Burroughs.
     
    Burroughs, Oct 7, 2008
    #29
  10. rbil

    rbil

    Joined:
    Aug 14, 2008
    Messages:
    730
    Likes Received:
    0
    Location:
    The Wet Coast, Canada
    If that is the case, then the newest script will work with your system as is. The only part that probably won't work is to do a SD_Card_Backup/Restore, although even that might work if there is a LEFT slot in your AAO and that card is recognized as: /dev/mmcblk0p1 If it's something else, then I can modify the script to accommodate it.

    In a nutshell, this is what the new script is actually doing:

    1) Backup - it's backing up /dev/sda - the complete drive that includes the MBR, ext2 system partition and the swap partition. This routine is using the dd/gzip programs.

    2) PartitionBackup - is backing up /dev/sda1 (just the ext2 parition) using partimage. So essentially it just automates what you're doing manually by running partimage.

    I'm going to guess that the script will work with the hd Linpus version as is. If you'd like to read my blog and setup a hard drive as outlined there, you can test it. I'm pretty sure by your description it's good to go.

    Cheers.
     
    rbil, Oct 7, 2008
    #30
  11. rbil

    Burroughs

    Joined:
    Oct 4, 2008
    Messages:
    13
    Likes Received:
    0
    Thanks, Rene'.
    Tomorrow, I'll give it a try; it's dinner time in Italy right now. ;)
    Cheers,

    Burroughs.
     
    Burroughs, Oct 7, 2008
    #31
  12. rbil

    Guest Guest


    The link has been removed. Now it looks like I have to buy the solution. Is this correct?
    Stephen. :(
     
    Guest, Oct 26, 2008
    #32
  13. rbil

    donec

    Joined:
    Sep 11, 2008
    Messages:
    952
    Likes Received:
    0
    For what it is worth the script Rbil made works with Mandriva 2009 Gnome also. Thanks again Rbil.
     
    donec, Oct 27, 2008
    #33
  14. rbil

    gerryaspire

    Joined:
    Nov 1, 2008
    Messages:
    6
    Likes Received:
    0
    This sounds just what I need!
    Any chance of re-linking the files? :?:
     
    gerryaspire, Nov 3, 2008
    #34
  15. rbil

    Guest Guest

    I got my own 8GB Kingston Flash Key and got the $20 rbil backup solution from his website this weekend.
    Worked great.
    Easy instructions (even for rookies).
     
    Guest, Nov 3, 2008
    #35
  16. rbil

    hxn664

    Joined:
    Oct 31, 2008
    Messages:
    1
    Likes Received:
    0
    I'd love to try this backup solution, but the blog has apparently been removed - is there any chance of obtaining the solution another way? Thanks!
     
    hxn664, Nov 3, 2008
    #36
  17. rbil

    donec

    Joined:
    Sep 11, 2008
    Messages:
    952
    Likes Received:
    0
    donec, Nov 3, 2008
    #37
  18. rbil

    donec

    Joined:
    Sep 11, 2008
    Messages:
    952
    Likes Received:
    0
    I don't know what you mean of re-linking the files.
     
    donec, Nov 3, 2008
    #38
  19. rbil

    gerryaspire

    Joined:
    Nov 1, 2008
    Messages:
    6
    Likes Received:
    0
    You've done it!
    Thanks! :D
     
    gerryaspire, Nov 3, 2008
    #39
  20. rbil

    philw

    Joined:
    Nov 13, 2008
    Messages:
    7
    Likes Received:
    0
    I just need a way to back up this system so if I trash it somehow I don't have to reinstall everythinng piece by piece, same as everyone else I guess. So it's the opposite of the "normal" situation, where I backup data and ignore the OS. In this case I want the opposite: I need to backup the OS but I don't care about the data (well I do but that's a different deal).

    I can see that the blog clearly states your script provides a backup for the SSD machines. I can also see you discussing the HD version. If I pay my money and download from the blog, will that backup and restore my OS, even though I have the HD version? If so, then that's this problem solved; if not, I need to find some way to backup the OS for the hard disk version. Does this work for the hard disk version, or is there another thread for that or something...? thanks..
     
    philw, Nov 16, 2008
    #40
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.