#!/bin/bash
dd if=/dev/sde conv=sync,noerror bs=64K | gzip -c > /srv/dev-disk-by-uuid-26cefdd5-3caf-4bb2-ac2e-2fa87ba6328e/OS_Backup/"backup-$(date +%F).img.>
By the way, here's the script if you want it. The backup plugin I think basically does the same thing. I just had a minor issue with it on restore.. but I think it might have been how I was restoring the image.
First as root..
nano os-backup.sh
Copy/paste the codebox above into the file
It's quite easy and you'd only need to change 2 things...
/dev/sde --- This you need to adjust to your OS drive (if you don't know the drive letter for your OS drive, use fdisk -l )
/srv/dev-disk... --- This is where you intend to store the images.
Once done, Contrl X, Y, then enter to save.
Now make the script executable.
Now run the script
and let it run. Depending on the size of your OS drive, it could take a while (like I said mine is 64gigs, and typically takes about 15-20min.. but I'm guessing there's multiple factors involved in how long this will take)
Once I know the script works, I just add it to scheduled tasks in the webUI...
![](https://forum.openmediavault.org/wsc/index.php?attachment/26213-screenshot-2022-09-18-16-56-54-png/&thumbnail=1)
That's it. It's more or less set it and forget it at that point.
Like I said, every few weeks SSH in and go to the folder that holds my images, and delete all but the 2 most current.