Backup Image of complete system without taking out SD

Yes, but it uses dd to create an empty image and not to make a copy of the card.

Yes, you’re right. But it does exclude a lot of stuff like ‘tmp/’, ‘proc/’, ‘swap’, etc. That’s why I said less error-prone”.

I also wouldn’t rely on it as my only backup solution.

Correct - too quick a glance. Better concentrate on work here :wink:

Absolutely, but ‘swap’ on an SD card based system is a no-go for me anyway.

I use image of OH to install, so i think it is normal FS or it supports it?

If its the only problem, i think its ok)

I’m talking about the file system of your NAS (or whereever your backup will be stored).

As I’ve said, I still wouldn’t rely on this as your only backup. At least backup all your vital files (like configs, etc.) by other means. The image is convenient to get back up and running very quickly, but if it fails you should still be able to restore your system another way.

This also can’t be stressed enough. Use something like zram to reduce sd-card writes. It’s good to have backups, it’s even better if you don’t need them.

Did you have already a look at https://github.com/StuartIanNaylor/zram-config. Seems this could relax the SD card load … I’ going to try this.
Till now I was running log2ram, but this seems to adress a more complete solution.

I use for my raspberry backups this two tools:

The RaspiBackup supports stopping services before dd’ing the image and restarts the services after finishing the backup. This avoids a corrupt image and I made really good experience. This backups helped me more than once …

Thank for advice - if u separately use [PiShrink] that means that the image creates as whole disk size and then compressed?
I have a 240 gb ssd - it will be a little bit long to make complete image of it or it works another way?

Hi,
I am successfully cloning my booted SD card to an USB stick with

rpi-clone (see here)

This mirrors the partition table of the SD-Card to the stick and then syncs the file systems with rsysnc.

rpi-clone is capable of reducing the size of the image depending on the ustilisation of the original partitions.

Note:
when running from a cron job it might fail.
I found the cron $PATH different to the root $PATH on my system.
So my cron job starts a script “clone.sh” which first sets the PATH to the values that root usually has and only then starts rpi-clone.

Yes, first a complete image will be created, which is going to be shrinked in a second step. I just have SD-Cards with a size of 8 or 16 GB.
A complete image of a size of 240GB might take to much time.
What about a backup of your data via rsnapshot or a similar tool. Do you fear that your SSD dies suddenly?
I’ve written an ansibe playbook, which reinstalls my raspberry from the scratch, but this take longer than restoring an SD-Card image. So finally I’ve two solutions:

  • backup of the image (faster restore)
  • ansible Playbook, which installs a complete raspbian (fallback, if restore fails)

My data is stored on my NAS, therefore I don’t need to much disk on my raspi, just for the system and software.