How to backup my existing installation?

Raspberry Pi related support

How to backup my existing installation?

Postby tux » 09 Mar 2014, 16:41

I wonder what's the best way to backup an existing runeaudio installation.

I have tested both dd from my Linux installation and w32diskmanager from Windows and they backup my whole sd card which is approx 8 gb.

Could I use dd with 'count' option to just dd the mb used in my card or it would cause any trouble?
User avatar
tux
 
Posts: 34
Joined: 22 Jan 2014, 23:39
Location: Greece

Re: How to backup my existing installation?

Postby atomicop » 09 Mar 2014, 17:24

You can use the count option to limit to the 2GB size, but that's still backing up the entire 2GB. It's a good start, but you probably want to just backup the things you've changed.
That way you can apply those changes to a new release if you want (warning: things change in new releases and your old files may not work properly). That being said, I can't currently tell you all the files you should backup individually. I would guess the /var/lib/mpd directory as well as /var/www, at a minimum, but I haven't fully tested any of that yet. Maybe some stuff in /etc as well.

Anyway, back to your original question, here's the basic idea for limiting your dd image:

Code: Select all
dd if=/dev/<sdcard> of=~/backup.dd count=2000683008


Or, run with a larger block size to increase the speed a bit:

Code: Select all
dd if=/dev/<sdcard> of=~/backup.dd bs=1M count=1908


(double-check the syntax for dd on your system.Example: bs=1M doesn't work on OS X; it requires bs=1m. Your system may vary as well)

2,000,683,008 is the byte count for the original image, so that should be all you need to capture into an image. 1908 is because the bs=1M takes 1048576 bytes at a time. 1,048,576 x 1908 = 2,000,683,008

If that's confusing, let me know and I'll try to clarify.
atomicop
 
Posts: 3
Joined: 20 Feb 2014, 18:15

Re: How to backup my existing installation?

Postby tux » 09 Mar 2014, 18:15

Thank you very much! Everything was very well understood.
User avatar
tux
 
Posts: 34
Joined: 22 Jan 2014, 23:39
Location: Greece

support RuneAudio Donate with PayPal


Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 5 guests
cron