Homepage Wiki Forum Buy

RootFS backup

From GNUBLIN

Contents

Via archiving software

Saving of actuall filesystem

If you wnat to backup your root filesystem on your local host PC, you have first to plug in you SD card onto your PC and then follow these steps below:


1. Change to root directory of SD filesystem:

cd /media/f24f3248-0455-4557-b1bc-377a297242a9

2. Compress everything into a tar :

sudo tar -zc -f /tmp/rootfs.tar.gz *


Restore the backup

1. Mount the SD card

mount /dev/sdb1 /mnt

2. Extract the archive:

sudo tar xvzf rootfs.tar.gz -C /media/mnt
sync


Binary images

Under linux its possible to backup a complete block devices like harddrives,via dd. In order to create such files, you only have to know which device file corresponds to your harddrive.The best way to determine is to tye in the command :

dmesg


unmount after auto-mount

The operating system often makes an automatic mount. For safety reasons you should unmount the SD card with the following instruction:

umount /dev/sd<X> (replace <X> with the right letter)

Saving of actuall filesystem

sudo dd if=/dev/sdX of=/tmp/meinImage.img

Attention! X stands for your own letter (mostly a or c)

Restore the backup

sudo dd if=/tmp/meinImage.img of=/dev/sdX

Attention! X stands for your own letter (mostly a or c)

If you want to see the progress:

sudo apt-get install pv
sudo dd if=/dev/sdX | pv | dd of=/tmp/meinImage.img

bzw.

sudo dd if=/tmp/meinImage.img | pv | dd of=/dev/sdX

with Windows

(Download on the bottom of the website: portable or setup)

In other languages