The backup plugin permit to handle everything transparently and automatically at specified time.
It is designed to be simple as possible, to use already existing tools as backend, and to do it as quick as possible.
The backends are:
dd | A block-level compressed raw image of a whole partition | Slow, but simple and well-supported |
ddfull | A block-level compressed raw image of a whole disk | Slower, but simple and well-supported |
FSArchiver | A file-level compressed image of all system partitions | Fast and efficient |
BorgBackup | A file-level compressed repository | The most complex, but the more efficient |
rsync | A simple file-level copy of all files | The simplest |
While this OMV plugin makes backup easy to integrate into openmediavault, based on your settings, the package use software who was created by a third party. See the project / author's
In OMV6's GUI:
Under System, Plugins, find and highlight openmediavault-backup 6.X, and click the install button.
Place Holder
For `ddfull` image, you can use USBImager (Linux, Mac-OS and Windows) or Win32 Disk Imager to restore with a GUI.
They are multiples way to identify your drive or partition, I'm going to explain a few one, fell free to use the one you fell the most confident with.
Remember that you can use the tabulation key to autocomplete path, and the control+c combination to blank your current command. Fell free to try using them beforehand.
Each disk (and partitions) have a different label which is constituted by is connection type (ata, scsi, …), model, serial number and partition number. It is probably the easiest way if you know or can read the label on the top of your drive.
We are going to store it inside a variable for later usage (you can memorize it if you prefer).
SOURCE=/dev/disk/by-id/ata-ST2000DL003-9VT166_5YD2W75Z
If you want to work with partition, and if you know the partition number, you can use the last command and add the partition number directly.
SOURCE=/dev/disk/by-id/ata-ST2000DL003-9VT166_5YD2W75Z-part1
If you don't know it's number, you can list them with `fdisk -l`.
root@omv-dev:~# fdisk -l $SOURCE Disk /dev/sdb: 50 GiB, 53687091200 bytes, 104857600 sectors Disk model: Virtual Disk Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: gpt Disk identifier: 88992846-D209-4046-84ED-1C4DC53ACDC8 Device Start End Sectors Size Type /dev/sdb1 2048 104857566 104855519 50G Linux filesystem
Now you can repeat the previous step but for the target drive.
TARGET=/dev/disk/by-id/ata-ST2000DL003-9VT166_5YD354DB-part2
We create a directory to mount our source first.
mkdir /source
We mount our source
mount $SOURCE /source
Remember again about the tab key for autocompletion.
Move to your folder holding your backup.
cd /source/backup/omvbackup
Double check your command before launching it, after it is launched they're NO WAY TO UNDO IT!
Launch the restore process with the backup of your choice.
zstdcat ./backup-omv-2023-04-23_11-20-11.dd.zst >$TARGET
When the prompt appear again, the copy is complete.
If an error is trow, you can try launching the restore again with dd.
zstdcat /backup-omv-2023-04-23_11-20-11.dd.zst | dd bs=1M iflag=fullblock of=$TARGET status=progress
Some advanced settings can be set by environment variable or in /etc/default/openmediavault.
Please don't use them useless you know what you're doing.
Variable | Default value | Description |
---|---|---|
OMV_BACKUP_DIR_NAME | omvbackup | Target directory name |
OMV_BACKUP_FILE_PREFIX | backup-omv | Prefix of backup files |
OMV_BACKUP_MAX_DEPTH | 1 | The maximum directory depth when old backup are purged |
OMV_BACKUP_FSA_COMP_LEVEL | 2 | FSArchiver compression level |
OMV_BACKUP_ZSTD_OPTIONS | zstd options for dd and ddfull mode | |
OMV_BACKUP_ZSTD_ADAPT | 0 | Activate the adaptive mode of zstd |