fmarzocca wrote: ↑
Thu Mar 14, 2019 9:31 am
I have seen many posts and "howto" concerning backing up Raspi's SD from remote, with the use of dd on the main mmcbl0 device (which has 2 partitions inside).
As an old time LInux user, I know how unreliable is it to backup mounted and running partitions: services, /sys, /proc, etc... I mean, you CAN backup mounted and running partitions, but what will be unreliable it is restoring that backup.
There's no point in backing up /sys, /proc, /dev etc as they are virtual or RAM based and created dynamically by the system.
I'd prefer to shutdown a system to at least single user mode, or better still, boot to ramdisk, in order to do a full backup. However that is not always possible.
The supplied desktop SD Card Copier does a good job. I believe it uses rsync to copy the files (could be wrong, it might just do a cp -r type thing). It also has a command line equivalent called piclone. Both of those require you to put a spare SD card in a USB adaptor in the Pi that is being backed up.
I'm a bit old school Unix. I use a couple of methods on my Pis. I first tar up the contents of /boot and save to a file in the main file system. Then I use the old "dump" command to dump that file system to a remote file. I do this weekly. On the first Sunday of the month I do a full (level 0) backup, which takes quite a while for some of my systems, then on the other Sundays I do an incremental (level 1) backup, which backs up just the changes since the level 0 backup. I've used this method for years across various Unix and Linux systems and have had to (successfully) rely on it a few times for restores of full systems (hard disk/SD Card fails) or individual files (finger troubles).
Yes, I do block a very small number of people.
No, I'm not going to name them. That would be childish.