Hi,
I have a Pogoplug v3 with ArchLinuxARM installed on a 4GB usb flash drive (/dev/sda), serving as a backup device. Now, it would be a pity if I would have to do a complete reinstallation in case that usb flash drive fails sometime. Therefore I'd like to create system images that I can restore if the flash drive might fail.
Aside from the basic arch installation that was done according to the tutorial, I also created a swap file on the same flash drive (as a file, not partition).
I am wondering now, how I could make a backup image of my current installation from my usb flash drive to another external usb drive. I know the basic command is:
$this->bbcode_second_pass_code('', 'dd if=/dev/sda of=/mnt/EXTERNALDRIVE/archlinux.img')
However, I am wondering what precautions I have to take in order to create a proper image of my running system. E.g. do I have to unmount my swap file first? Do I have to switch to runlevel 1 before creating the image (I read that somewhere, but with ssh that might be tricky unless I can put all my commands into a shell script and let it automatically reboot after the image is completed)?
Are there any precautions I should take? Do I have to set any parameters to the dd command except if and of?
Thanks,
Timo