Darkassassin07, (edited )
@Darkassassin07@lemmy.ca avatar

I wrote a bash script a while back that uses sshfs to mount an ssh server to the filesystem, then uses dd to write /dev/mmcblk0 to it as hostname-date.img and finally unmount the ssh server. Cron job runs that daily.

I run that on each of my rpis. (just one rn, but theres been as many as 4 going).

Any time I have an issue, be that my fault or not, I can just pull the sd card and write the last .img to it directly.

There’s some extra stuff in there too: it checks for the dependancy sshfs and installs it if missing (for deploying to a new system without reconfiguring), cleans up backups older than x days, logging, and the ability to write the log file as a test instead of the whole filesystem.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • selfhosted@lemmy.world
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #