Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A versatile backup manager using btrfs snapshots for incremental local and remote backups

NotificationsYou must be signed in to change notification settings

denialofsandwich/b4-backup

Repository files navigation

B4 is another tool for creating incremental backups using btrfs subvolumes.

✨ Features

It comes with the following features:

  • Backup remote systems or subvolumes
  • Backup subvolumes inside subvolumes recursively
  • Restore snapshots by replacing or copying them side by side
  • Apply rules which subvolumes to keep and how to restore them
  • Apply rules how long to keep the backups and at which density.

⚡️ Requirements

  • Python 3.12 or higher
  • A btrfs partition on the machine you want to backup and your backup destination.
  • btrfs-progs

🚀 Getting Started

Take a look at theinstallation guide to get started.Once installed, you might take a look at theexample use cases to get a starting point.

Example

This is just an example to explain the most important features.More examples can be found here

Let's say we want to backup a server with a nextcloud instance on it. The btrfs subvolume we want to backup is/opt/nextcloud. This is where we store all nextcloud-related data.

backup_targets:# This is just a name, we want to give our targetnextcloud.example.com:# The location which we want to backupsource:ssh://root@nextcloud.example.com/opt/nextcloud# The location where we want to store the backups.# A local path means, that the backups are stored on the same machine as b4.destination:/opt/backups# In order to be able to send snapshots incrementally, we need to have at least one parent snapshot on source side.# Here we can define how many snapshots we want to keep for which amount of time.src_retention:auto:# You can create multiple rulesets, to be able to handle manual snapshots differently than automatic ones.all:"3"# Keep only 3 snapshots on source sidemanual:all:"7days"# Keep all snapshots for 7 days on a manual backup# The same applies to the destination side.dst_retention:auto:1day:1month# Keep daily snapshots for 1 month1week:1year# After that remove as many snapshots to only weekly snapshots remain, which are kept fpr a year1month:forever# After a year keep snapshots at a monthly interval forevertimezone:utc# While using the CLI, these are the targets which are used by default.default_targets:  -nextcloud.example.com

To actually create a backup, you can use the following command:

b4 backup

Documentation

The full documentation can be found here

About

A versatile backup manager using btrfs snapshots for incremental local and remote backups

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp