• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Successful quick backup and update to a second SDCard with rsync  (Read 4254 times)
CqCn
Full Member
***

Karma: 0
Posts: 169



View Profile
« on: August 10, 2009, 01:50:37 PM »

I am currently running the released version of sw, copied to a SDCard and booting the *nix from the SDCard.  I have done the following successfully.  Apt-get installed rsync.  Plugged in a second SDCard into the usb port with a USB-SD adapter.  This backup SDCard is of the same or bigger size than the one currently in the SDCard side slot (rootfs).

After fidk, mkfs on he second card (one time only), I can successfully transfer the running system image into the second card with r sync..  This is faster, and generally more reliable than cp.  Also, subsequent updates of the image to the backup card is very fast, since only delta files are transferred.  Depending on the amount of change, most delta update can be done in less than a minute.  Even more importantly, since this is a delta write, only a small portion of the card is rewritten, thereby significantly reducing the wear on the flash

When needed, I can simply switch the backed up card as the primary running system.  By using a total of 3 cards, and rotating among them, you always have at least one good copy of a full system with all your accumulated work.
Logged

Cordially, CqCn

billybob
Newbie
*

Karma: -1
Posts: 16


View Profile
« Reply #1 on: October 16, 2009, 04:34:15 PM »

This sounds like just what I am trying to do. Could you please give me a little more info on setting up the second SD card in the USB adapter? I have the plug booting off an SD card at present but want to back it up before making big changes so I can easily go back one step. I'm afraid the fidk and mkfs mean very little to me. Thanks.
Logged

knireis
Jr. Member
**

Karma: 2
Posts: 88


View Profile
« Reply #2 on: October 17, 2009, 01:43:46 AM »

What i do and works quite good as well is, with the use of a usb adapter i stick the sd-card in my windows pc and create an image of the complete sd-card. There are several image software programs available (i use acronis). When something goes wrong just restore the image to the sd-card and you're back in business.
Logged

billybob
Newbie
*

Karma: -1
Posts: 16


View Profile
« Reply #3 on: October 17, 2009, 05:53:36 AM »

Good idea  and as it happens I have Acronis and just gave it a try but the SD card isn't recognised by windows as it is ext3 format. What format do you use for SD and how do you get it to read on windows please?
Logged

knireis
Jr. Member
**

Karma: 2
Posts: 88


View Profile
« Reply #4 on: October 17, 2009, 05:57:21 AM »

Good idea  and as it happens I have Acronis and just gave it a try but the SD card isn't recognised by windows as it is ext3 format. What format do you use for SD and how do you get it to read on windows please?

The format does not matter, but you have to use an usb adapter (card-reader) otherwise your sd-card is not recognized by acronis.
Logged

billybob
Newbie
*

Karma: -1
Posts: 16


View Profile
« Reply #5 on: October 17, 2009, 07:34:40 AM »

Thanks, I just realised it needed to be a sector by sector image. Still popped up with a couple of errors but works a treat.
Now I actually have a backup I will try to get rysnc to send a backup over the network to a windows share if that is possible.
Logged

CqCn
Full Member
***

Karma: 0
Posts: 169



View Profile
« Reply #6 on: October 18, 2009, 06:02:33 PM »

billybob,

The method I mentioned is very easy to do. It has the advantage of doing a bacup without having to touch your ShPg, even from a remote terminal. While you are logged into your system snd using it normally, you simply execute one command, and full backup will be done within a minute (only the delta of changed/new files are updated/copied).

Sorry, in my last msg I meant fdisk...

Let us say you are running from the SDCardin the sdcard slot.  Have your backup SDCard (or usb stick), formatted just as you formatted your orignal sdcard.  If it is a sdcard, you need an sdcard/usb adapter so that your backup sdcard can be plugged into the usb slot.

BTW, you can format and do all the initialization of any sdcard or usbstick (right after you buy one or an older used one) right in the usb slot.

You setup to access the backup card in the normal way to access thru linux from the usb port.  Now you simply use rsync (which has to be downloaded/installed just like any new utiity, if you do not already have it on your system), and a single command will copy the image of the sdcard over to your new card.  You can stop the computer, and then use the backed up card in the sdcard slot and boot from there.

With other methods described in some of the threads here, you can even avoid having to physically change the cards in the slot.  You can boot the system from the sdcard slot or the usbslot, and then change the procedure to backup from the usb slot (now booted from there) to the sdcard slot, which becomes the backup now.

I do the switching to the new card (booting from there) every so often;  this assures me that the copy  made is functional, without having to wait until trouble strikes.  I usually have 2 or more backup cards (rotated through), which insures that there as at least one good backup all the time. (Suppose you have damaged you working os card somehow, and then made s backup copy.  Now you have two bad cards Smiley  It is in this situation that 3rd copy becomes handy!

If you are not familiar with the necessary linux commands to do all the above (rsync has a lot of options too) steps,  I can write a detailed Wiki how to at sometime soon.  I just got back just now after being away from home for almost a month.
Logged

Cordially, CqCn

Pages: [1]
Print
Jump to: