docs_in_draft:backup-next

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
docs_in_draft:backup-next [2023/04/23 12:56] – Created from template clexanisdocs_in_draft:backup-next [2023/05/05 13:39] (current) – Add restore instruction for dd clexanis
Line 1: Line 1:
-<html><center><span style="color:#b7620b;font-size:300%;">Incomplete Document</span></center></html>+<html><center><span style="color:#b7620b;font-size:300%;">Incomplete Document for the next version</span></center></html>
 <html><center><span style="color:#b7620b;font-size:300%;">Not for public use</span></center></html> <html><center><span style="color:#b7620b;font-size:300%;">Not for public use</span></center></html>
 {{ :underconstruction.jpg?400 |}} {{ :underconstruction.jpg?400 |}}
Line 5: Line 5:
 ---- ----
 \\ \\
-<html><center><b>XXXX Plugin For OMV6</b></center></html>+<html><center><b>In-development Backup Plugin For OMV6</b></center></html>
  
 {{ :omvextras_logo4.jpg?400 |}} {{ :omvextras_logo4.jpg?400 |}}
  
-====== XXXX Plugin For OMV6 ======+====== Backup Plugin For OMV6 ======
 \\ \\
 \\ \\
Line 15: Line 15:
 ===== Summary ===== ===== Summary =====
  
-XXXX +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|
  
 ==== Third Party Software Note ==== ==== Third Party Software Note ====
  
-While this OMV plugin makes the XXXXX package easy to integrate into openmediavault, the XXXXX package itself was created by a third party.  See the project / author'->  XXXXX web page  for more detailed information and support.+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 
 +  * dd from [[https://www.gnu.org/software/coreutils|GNU Coreutils]]. 
 +  * [[https://www.fsarchiver.org|FSArchiver]] by Francois Dupoux. 
 +  * [[https://www.borgbackup.org|BorgBackup]]. 
 +  * [[https://rsync.samba.org|rsync]] maintained by Wayne Davison
  
 ===== Prerequisites ===== ===== Prerequisites =====
Line 29: Line 42:
  
 In OMV6's GUI:\\ In OMV6's GUI:\\
-Under **System**, **Plugins**, find and highlight **XXXX 6.X**, and click the **install** button.+Under **System**, **Plugins**, find and highlight **openmediavault-backup 6.X**, and click the **install** button.
  
 ===== Configuration ===== ===== Configuration =====
Line 35: Line 48:
 Place Holder\\ Place Holder\\
 \\ \\
 +
 +===== Restore =====
 +
 +
 +==== ddfull (GUI) ====
 +
 +For `ddfull` image, you can use [[https://bztsrc.gitlab.io/usbimager|USBImager]] (Linux, Mac-OS and Windows) or [[https://sourceforge.net/projects/win32diskimager|Win32 Disk Imager]] to restore with a GUI.
 +
 +==== dd and ddfull (CLI) ====
 +
 +=== Identify your drive or partition ===
 +
 +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.
 +
 +
 +=== By label ===
 +
 +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).
 +
 +<code bash>SOURCE=/dev/disk/by-id/ata-ST2000DL003-9VT166_5YD2W75Z</code>
 +
 +=== For partition (dd) ===
 +
 +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.
 +
 +<code bash>SOURCE=/dev/disk/by-id/ata-ST2000DL003-9VT166_5YD2W75Z-part1</code>
 +
 +If you don't know it's number, you can list them with `fdisk -l`.
 +
 +<code bash>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</code>
 +
 +=== For the target ===
 +
 +Now you can repeat the previous step but for the target drive.
 +
 +<code bash>TARGET=/dev/disk/by-id/ata-ST2000DL003-9VT166_5YD354DB-part2</code>
 +
 +=== Prepare and locate your backup ===
 +
 +=== Create a directory for mounting the source ===
 +
 +We create a directory to mount our source first.
 +
 +<code bash>mkdir /source</code>
 +
 +=== Mount the source filesystem ===
 +
 +We mount our source
 +
 +<code bash>mount $SOURCE /source</code>
 +
 +=== Locate your backup folder ===
 +
 +> Remember again about the tab key for autocompletion.
 +
 +Move to your folder holding your backup.
 +
 +<code bash>cd /source/backup/omvbackup</code>
 +
 +=== Restore ===
 +
 +> **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.
 +
 +<code bash>zstdcat ./backup-omv-2023-04-23_11-20-11.dd.zst >$TARGET</code>
 +
 +When the prompt appear again, the copy is complete.
 +
 +If an error is trow, you can try launching the restore again with dd.
 +
 +<code bash>zstdcat /backup-omv-2023-04-23_11-20-11.dd.zst | dd bs=1M iflag=fullblock of=$TARGET status=progress</code>
 +
 +
 +===== Advanced settings =====
 +
 +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|
  
 ===== Source Code ===== ===== Source Code =====
  
--> [[https://github.com/OpenMediaVault-Plugin-Developers/openmediavault-XXXXX|Source Code]]+-> [[https://github.com/OpenMediaVault-Plugin-Developers/openmediavault-backup|Source Code]]
  • docs_in_draft/backup-next.1682254609.txt.gz
  • Last modified: 2023/04/23 12:56
  • by clexanis