andreaskielkopf / BackSnap

Backup btrfs snapshots made by snapper / timeshift to external storage
GNU General Public License v3.0
9 stars 2 forks source link
arch-linux backup btrfs manjaro-linux receive send snapper snapshots timeshift

How to use BackSnap

Install backsnap en ->

Install backsnap de ->

or [HowTo] Backup btrfs snapshots with send/receive

BackSnap in action With BackSnap, regular backups for btrfs are no longer a burden, but an easy task.

Goals of BackSnap:

Simple external backup of (btrfs) subvolumes with all snapshots

No Goal:
Desirable side effects

Requirements:

BackSnap:

The Java program BackSnap backs up ALL snapshots from a specified directory to another directory on a backup medium. To do this, it uses btrfs send and btrfs receive.

With configuration in /etc/backsnap.d/ (recommendet)

You only need to start backsnap in a terminal. It will look for configuration and flags in /etc/backsnap.d/ In a terminal: sudo backsnap -gc -v=5 -a=5 This is way faster then calling backsnap for each pc or subvolume, because the backup-disk will only be mounted once.

Without configuration

Source (snapshots)

The 1st passed parameter points to the SOURCE path where the snapshots are reachable by Snapper. Snapper creates all snapshots in directories with ascending numbering. The actual snapshot there is simply called "snapshot".

Destination (backups)

The 2nd parameter points to the DESTINATION path at which the snapshots are to be saved. To do this, the backup medium must be mounted before the program is called. A backup subvolume named /@BackSnap and a directory with individual Names for each subvolume of each PC are suggested. The path to this mounted directory will be specified as the TARGET path for the backup.

Backsnap goes through all the directories in the source path in ascending time order and checks if that respective directory already exists at the destination. If not, the snapshot will be saved there.

If possible, a previous snapshot is used as "parent".

Each time the program is called, all snapshots of ONE subvolume can be backed up, which corresponds to ONE configuration of Snapper or Timeshift.

Furter reading:

Install backsnap en ->

Install backsnap de ->

Afterword

A snapshot is not a backup!

I've read that before. Basically true, but a BTRFS snapshot is as good as any other system internal backup. Btrfs can provide home users with a high level of security against data loss. With a little additional effort, external backup for BTRFS can also be implemented. Then a 3-2-1 backup with Btrfs is possible without any problems

The responsibility for backups never lies with a program, but always with the user!

In-system backup (n-snapshots 1)

Btrfs with RAID0 and read-only snapshots via Snapper (or Timeshift) are like a backup of the original files stored in the same system. It protects against:

In-system backup with RAID (+1)

Running btrfs with "RAID1" on at least two different devices is as good as local backup. This also protects against:

Out-of-system backup (+1)

If the snapshots are also backed up to an external hard drive, it is another TRUE external backup. Ideally, the external hard drive should only be connected to the computer for a short period of time. This also protects against:

Btrfs then corresponds to 3-2-1 Backup (Near CDP)


Sonntag, 29. Oktober 2023 17:45