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.