mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-23 08:16:54 +00:00
Added backup by serial method documentation (#7932)
docs: create disk/partition sector backup by disk serial number
This commit is contained in:
parent
8ebeb3ccc7
commit
6bbd327dc2
1 changed files with 36 additions and 1 deletions
|
@ -8,6 +8,41 @@ Backing up disk images can still be efficient with Borg because its `deduplicati
|
||||||
technique makes sure only the modified parts of the file are stored. Borg also has
|
technique makes sure only the modified parts of the file are stored. Borg also has
|
||||||
optional simple sparse file support for extract.
|
optional simple sparse file support for extract.
|
||||||
|
|
||||||
|
It is of utmost importancy to pin down the disk you want to backup.
|
||||||
|
You need to use the SERIAL for that.
|
||||||
|
Use:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# You can find the short disk serial by:
|
||||||
|
# udevadm info --query=property --name=nvme1n1 | grep ID_SERIAL_SHORT | cut -d '=' -f 2
|
||||||
|
|
||||||
|
DISK_SERIAL="7VS0224F"
|
||||||
|
DISK_ID=$(readlink -f /dev/disk/by-id/*"${DISK_SERIAL}") # Returns /dev/nvme1n1
|
||||||
|
|
||||||
|
mapfile -t PARTITIONS < <(lsblk -o NAME,TYPE -p -n -l "$DISK_ID" | awk '$2 == "part" {print $1}')
|
||||||
|
echo "Partitions of $DISK_ID:"
|
||||||
|
echo "${PARTITIONS[@]}"
|
||||||
|
echo "Disk Identifier: $DISK_ID"
|
||||||
|
|
||||||
|
# Use the following line to perform a borg backup for the full disk:
|
||||||
|
# borg create --read-special /path/to/repo::{now} "$DISK_ID"
|
||||||
|
|
||||||
|
# Use the following to perform a borg backup for all partitions of the disk
|
||||||
|
# borg create --read-special /path/to/repo::{now} "${PARTITIONS[@]}"
|
||||||
|
|
||||||
|
# Example output:
|
||||||
|
# Partitions of /dev/nvme1n1:
|
||||||
|
# /dev/nvme1n1p1
|
||||||
|
# /dev/nvme1n1p2
|
||||||
|
# /dev/nvme1n1p3
|
||||||
|
# Disk Identifier: /dev/nvme1n1
|
||||||
|
# borg create --read-special /path/to/repo::{now} /dev/nvme1n1
|
||||||
|
# borg create --read-special /path/to/repo::{now} /dev/nvme1n1p1 /dev/nvme1n1p2 /dev/nvme1n1p3
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Decreasing the size of image backups
|
Decreasing the size of image backups
|
||||||
------------------------------------
|
------------------------------------
|
||||||
|
|
||||||
|
@ -116,4 +151,4 @@ way to create application-consistent backups.
|
||||||
|
|
||||||
Borg doesn't intend to address these issues due to their huge complexity and
|
Borg doesn't intend to address these issues due to their huge complexity and
|
||||||
platform/software dependency. Combining Borg with the mechanisms provided by the platform
|
platform/software dependency. Combining Borg with the mechanisms provided by the platform
|
||||||
(snapshots, hypervisor features) will be the best approach to start tackling them.
|
(snapshots, hypervisor features) will be the best approach to start tackling them.
|
||||||
|
|
Loading…
Reference in a new issue