Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 1016 Bytes

File metadata and controls

18 lines (14 loc) · 1016 Bytes

backup btrfs filesystem using snapshot

WARNING! Running this file, you accept that you know what you're doing. All actions with this script are at your own risk.

Example of how to perform backup of btrfs filesystem using snapshot(s). Before you begin to check your kernel version, btrfs status and btrfs changelog. Some old versions may have a non-working functional.

Variables inside a script:

  • SOURCE_FILESYSTEM_PATH (e.g. "/mnt/data/ssd/folder"): Source btrfs filesystem to create snapshot from.
  • BACKUP_FILESYSTEM_PATH (e.g "/mnt/data/backup"): Destination filesystem to send created snapshot. In general this is a backup path.
  • SNAPSHOTS_PATH (e.g. "/mnt/data/ssd/.snapshots"): Temporary filesystem to create snapshot.