You are not logged in.

#1 2012-03-16 21:10:25

kdar
Member
From: Sweet home Alabama!
Registered: 2009-06-27
Posts: 356

Backup SD card with bootable Linux?

I have SD card that has bootable Linux for one development board.

What can I use in Linux to make a backup image of this card? (so I could easily recover to a working state if I will mess it up).

Offline

#2 2012-03-16 21:30:40

hesse
Member
Registered: 2011-12-08
Posts: 88

Re: Backup SD card with bootable Linux?

I have not tested this, but you should easily be able to do just this using the dd command. Simply specify the path to your hard drive/sd card (here assuming it's /dev/sdb) and the path to the new image to be created:

# dd if=/dev/sdb of=/some/path/backup_image

and to restore backup (be careful not overwrite some random partition or disk here):

# dd if=/some/path/backup_image of=/dev/sdb

This last command will overwrite everything residing on /dev/sdb so be sure you really want to do it.

Last edited by hesse (2012-03-16 21:37:13)

Offline

#3 2012-03-16 21:48:45

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,797

Re: Backup SD card with bootable Linux?

hesse wrote:

I have not tested this, but you should easily be able to do just this using the dd command. Simply specify the path to your hard drive/sd card (here assuming it's /dev/sdb) and the path to the new image to be created:

# dd if=/dev/sdb of=/some/path/backup_image

and to restore backup (be careful not overwrite some random partition or disk here):

# dd if=/some/path/backup_image of=/dev/sdb

This last command will overwrite everything residing on /dev/sdb so be sure you really want to do it.

Be very careful with the dd command.  It was said twice in quoted post, but I thought I would say it again.  If you mess up the output file name, you will have a very bad day.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#4 2012-03-17 18:43:31

Alber
Member
From: Spain - España
Registered: 2011-11-11
Posts: 227

Re: Backup SD card with bootable Linux?

It's explain here too.

[SOLVED] How to make an USB stick clone?
https://bbs.archlinux.org/viewtopic.php?id=136787


Because not all of us are native English speakers, try no to use slang or abbreviations, thank you.

Offline

#5 2012-03-17 20:11:28

dodo3773
Member
Registered: 2011-03-17
Posts: 818

Re: Backup SD card with bootable Linux?

Even after cloning you may have to set the boot flag on the sd card with parted or similar. If I remember correctly I had to.

Offline

Board footer

Powered by FluxBB