NSLU2-Linux
view · edit · print · history

SlugOS.HowToBackupAndRestoreSlugOSBetweenTwoMemorySticks History

Hide minor edits - Show changes to markup

July 21, 2006, at 08:34 PM by nicka --
Changed lines 19-20 from:

I followed the config recommended in the InitializingDisks? link, so my main disk is organized like this:

to:

I followed the config recommended in the Initializingdisks link, so my main disk is organized like this:

July 21, 2006, at 08:33 PM by nicka --
Changed lines 9-10 from:

1. Plug your extra memory stick into the spare usb port and configure it with an equivalent set of partitions to the main drive (the partitions don't have to be the same size, although you obviously want to make sure you have room to backup the files in each partition on the main drive):

to:

A. Plug your extra memory stick into the spare usb port and configure it with an equivalent set of partitions to the main drive (the partitions don't have to be the same size, although you obviously want to make sure you have room to backup the files in each partition on the main drive):

Changed line 16 from:

2. Create a copy of your main drive using rsync – instructions are here:

to:

B. Create a copy of your main drive using rsync – instructions are here:

Changed line 44 from:

3. Restore

to:

C. Restore

Changed lines 57-58 from:

4. If you are just testing your backup you can go back to the original main drive after the restore by:

to:

D. If you are just testing your backup you can go back to the original main drive after the restore by:

Changed lines 62-63 from:

.. and then repeat the stage 3. The lazy amongst you will have noticed you can do all of the testing without leaving your chair (just keep switching the ‘turnup disk’ instruction between /dev/sda1 and /dev/sda1)

to:

.. and then repeat stage C. The lazy amongst you will have noticed you can do all of the testing without leaving your chair (just keep switching the ‘turnup disk’ instruction between /dev/sda1 and /dev/sda1)

July 21, 2006, at 08:31 PM by nicka --
Changed lines 30-35 from:

I have a simple script to synchronize the data between the main and backup drive:

  1. !/bin/sh

rsync -rclpgovD --delete /opt /media/sdb3 rsync -rclpgovD --delete --exclude-from=/root/backups/rsync-exclude /media/sdb1

to:

I use the following commands to synchronise the data between the main and backup drive:

  1. rsync -rclpgovD --delete /opt /media/sdb3
  2. rsync -rclpgovD --delete --exclude-from=/root/backups/rsync-exclude /media/sdb1
July 21, 2006, at 08:29 PM by nicka --
Changed lines 7-8 from:

A note of caution – I have tried this a few times without issue, but you might not be so lucky. Probably best to try it on a system you cherish dearly 

to:

A note of caution – I have tried this a few times without issue, but you might not be so lucky. Probably best not to try it on a system you cherish dearly !

Changed line 33 from:

rsync -rclpgovD --delete /opt /media/sdb3

to:

rsync -rclpgovD --delete /opt /media/sdb3

Changed lines 40-41 from:
  1. mount /dev/sdb1 /media/sdb1
to:
  1. mount /dev/sdb1 /media/sdb1
Changed lines 49-50 from:
  1. turnup disk /dev/sda1 -t ext3
to:
  1. turnup disk /dev/sda1 -t ext3
July 21, 2006, at 08:28 PM by nicka --
Changed lines 5-6 from:

This howto has been written by a Linux novice who moved from unslung because of stability problems. Most of the information is from other HowTos? on this Wiki, I've simply summarized it below – hopefully this will help other relative newbies (you probably need some *nix experience – but I guess if you got as far as running OpenSlug, you do)

to:

This howto has been written by a Linux novice who moved from unslung because of stability problems. Most of the information is from other howtos on this Wiki, I've simply summarized it below – hopefully this will help other relative newbies (you probably need some *nix experience – but I guess if you got as far as running OpenSlug, you do)

Changed lines 26-29 from:

/dev/sdb1 1 710 176049 83 Linux /dev/sdb2 711 809 24552 82 Linux swap /dev/sdb3 810 1015 51088 83 Linux

to:
/dev/sdb1171017604983Linux
/dev/sdb27118092455282Linux swap
/dev/sdb381010155108883Linux
July 21, 2006, at 08:25 PM by nicka --
Deleted line 0:
Changed lines 17-18 from:

http://w

to:

http://www.nslu2-linux.org/wiki/HowTo/BackupYourLinuxBox

Changed lines 21-24 from:

/dev/sda1 1 751 744961 83 Linux /dev/sda2 752 880 127968 82 Linux swap /dev/sda3 881 1009 127968 83 Linux

to:
/dev/sda1175174496183Linux
/dev/sda275288012796882Linux swap
/dev/sda3881100912796883Linux
July 21, 2006, at 08:22 PM by nicka -- How do I backup and restore on OpenSlug 3.1
Added lines 1-67:

How do I backup and restore on OpenSlug 3.1?

A short summary of what I did to create a backup of my slug (running on a 1GB flash stick) so I could restore the system on a spare flash stick .

This howto has been written by a Linux novice who moved from unslung because of stability problems. Most of the information is from other HowTos? on this Wiki, I've simply summarized it below – hopefully this will help other relative newbies (you probably need some *nix experience – but I guess if you got as far as running OpenSlug, you do)

A note of caution – I have tried this a few times without issue, but you might not be so lucky. Probably best to try it on a system you cherish dearly 

1. Plug your extra memory stick into the spare usb port and configure it with an equivalent set of partitions to the main drive (the partitions don't have to be the same size, although you obviously want to make sure you have room to backup the files in each partition on the main drive):

Instructions on using fdisk are here: http://www.nslu2-linux.org/wiki/OpenSlug/InitialisingDisks

...don't go beyond the point where it describes 'Moving root file system'

2. Create a copy of your main drive using rsync – instructions are here: http://w

I followed the config recommended in the InitializingDisks? link, so my main disk is organized like this:

/dev/sda1 1 751 744961 83 Linux /dev/sda2 752 880 127968 82 Linux swap /dev/sda3 881 1009 127968 83 Linux

and my backup: /dev/sdb1 1 710 176049 83 Linux /dev/sdb2 711 809 24552 82 Linux swap /dev/sdb3 810 1015 51088 83 Linux

I have a simple script to synchronize the data between the main and backup drive:

  1. !/bin/sh

rsync -rclpgovD --delete /opt /media/sdb3 rsync -rclpgovD --delete --exclude-from=/root/backups/rsync-exclude /media/sdb1

notes: Note I couldn't figure out how to get rsync to use timestamps (errors about setting timestamps on some files),so I use the -c (checksum) option instead.

On my set-up backup partitions are mounted automatically (I don't really know what controls this in openslug) - if it doesn't happen on other installations you can add the mount commands to your backup script:

  1. mount /dev/sdb1 /media/sdb1

.. etc

3. Restore take out the main drive and plug the backup into port 1 - the slug should boot to flash.

Run turnup to copy the root file system to a partition on the backup drive:

  1. turnup disk /dev/sda1 -t ext3

Note : despite using a flash stick, I used 'disk' when I did the original installation on the main flash stick (if you used the 'memstick' option, you should think about use that option again in the restore) Note : don't use the -i (apparently this flag tells turnup you are starting with an empty filesystem and – hopefully – you aren’t)

.. that's it. Reboot and you should now be using your back up storage as the main drive. You will need to enable the swap partition:

  1. swapon /dev/sda2

4. If you are just testing your backup you can go back to the original main drive after the restore by:

  1. turnup flash
  2. reboot

.. and then repeat the stage 3. The lazy amongst you will have noticed you can do all of the testing without leaving your chair (just keep switching the ‘turnup disk’ instruction between /dev/sda1 and /dev/sda1)

Hope it helps

Nick, UK

view · edit · print · history · Last edited by nicka.
Originally by nicka.
Page last modified on July 21, 2006, at 08:34 PM