• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: What's the best way to backup my current setup.  (Read 2382 times)
davolfman
Newbie
*

Karma: 0
Posts: 4


View Profile
« on: October 10, 2009, 03:41:27 PM »

In the past few days, I've gotten by plug, got the Installer working, played around a little with the Ubuntu setup and installed a few basic packages.  Everything's running on the integrated NAND and I'd like to make a backup of my current setup to someplace else, ideally a USB thumbdrive before I start the really crazy stuff like getting a SANE backend up and running or software RAID 1 between thumbdrive and SDHC shared by Samba.

I've got a few ideas:
Tar-up the whole filesystem with a bunch of excludes.  I actually tried this already, but it didn't work for some reason.  Either I got it wrong or my network burped on me but it kicked me out of SSH and changed its IP address 16MB into the process.  That's still got me scratching my head and trying to remember how to spin off console-independent jobs without X.

dd the underlying partition: is that even safe?

Rootfs images.  That term keeps getting bandied about on the Wiki in ways I don't yet entirely grok, but it sounds like it might integrate nicely with Uboot which means I am VERY interested.

I'm sure someone has this figured out.
Logged

odoll
Full Member
***

Karma: 0
Posts: 148


View Profile
« Reply #1 on: October 11, 2009, 01:12:16 AM »

Quote
I'm sure someone has this figured out.

no, not really, thou I'm following another concept. My intention is to have everything running from an SD card, thus the NAND config just to be a fall-back. IMO this at least has two advantages:

i) you could still use your approach for a backup, as it doesn't make difference if the it's coming from NAND or SD!?
ii) it's esier to make regular images from an SD card
iii) you can have several SD cards with builds going into different directs which can be scratched easily to start over again.
« Last Edit: October 11, 2009, 01:13:53 AM by odoll » Logged

mgillespie
Full Member
***

Karma: 8
Posts: 239



View Profile
« Reply #2 on: October 11, 2009, 04:46:34 AM »

I have a script that backs up my root filesystem to my USB HDD once a month. It saves it to a unique directory called the date, and it also creates a list of installed ubuntu packages.

Seems to work well.  I restored from it recently when I wiped the filesystem and installed the SheevaPlug Installer 1.0

Code:
#!/bin/bash
DIR=/usb/DataBackups/SheevaRootFS/$(date +%Y%m%d)/
mkdir $DIR
dpkg -l |grep '^ii' > $DIR/InstalledPackages.txt
tar cjf /$DIR/backup.tar.bz2 --exclude=/usb --exclude=/lost+found --exclude=/proc --exclude=/dev --exclude=/sys /
Logged

mcmusic
Newbie
*

Karma: 0
Posts: 7


View Profile
« Reply #3 on: October 15, 2009, 03:41:46 AM »

Hi

What i want to do is clone my plug. So, I have one master plug which has everything installed on the NAND just the way i want, with every package set.

I now have a second plug and want to do a quick and easy clone to get a second plug identical to the first.

so, my question - is there a smimple way to do this? can i simply run this script above to create the back up > copy to my new plug and extract overwiriting the original file system?

What i am trying to avoid - installing all packages again on the new plug.

Logged

DamonHD
Full Member
***

Karma: 4
Posts: 169


View Profile WWW
« Reply #4 on: October 15, 2009, 04:09:41 AM »

I would have thought that getting packages and the packages database consistent would be tricky.

I assume that I cannot just copy round operating systems by brute force and have the target work reliably.

Rgds

Damon
Logged

davolfman
Newbie
*

Karma: 0
Posts: 4


View Profile
« Reply #5 on: October 20, 2009, 01:10:41 AM »

tar didn't choke the second time around.  I must have just hit the end of my DHCP lease right in the middle of my tar job by sheer dumb bad luck.  So you can use tar on an entire running file system.  Now I'm left pondering an implementation detail.  On recent kernels are the virtual filesystem directories generated by the kernel?  Or are they mounted into existing blank directories that need to be in the tree and probably have the right permissions to start.  If the latter that complicates restore, mostly to the extent of a logicless shell script.

Of course I think the ideal would be to have something where I could bootstrap the restore prucess in from Uboot somehow.
Logged

Pages: [1]
Print
Jump to: