All Projects → nachoparker → btrfs-snp

nachoparker / btrfs-snp

Licence: GPL-3.0 license
Automatic BTRFS snapshots made simple

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to btrfs-snp

Qubes-scripts
Scripts that help with administration and usage of Qubes OS
Stars: ✭ 33 (-37.74%)
Mutual labels:  btrfs-snapshots
rusnapshot
Simple and handy btrfs snapshoting tool. Supports unattended snapshots, tracking, restoring, automatic cleanup and more. Backed with SQLite.
Stars: ✭ 27 (-49.06%)
Mutual labels:  btrfs-snapshots
arch-secure-boot
UEFI Secure Boot for Arch Linux + btrfs snapshot recovery
Stars: ✭ 60 (+13.21%)
Mutual labels:  btrfs-snapshots
arch-btrfs-install-guide
Arch Linux installation guide with btrfs and snapper, this guide is based on the information from unicks.eu guide https://www.youtube.com/watch?v=TKdZiCTh3EM, and Arch Linux UEFI step-by-step installation guide https://www.youtube.com/watch?v=dOXYZ8hKdmc from ALU.
Stars: ✭ 32 (-39.62%)
Mutual labels:  btrfs-snapshots

btrfs-snp

Create BTRFS snapshots, manually or from cron.

Usage

# btrfs-snp
Usage: btrfs-snp <dir> (<tag>) (<limit>) (<seconds>) (<destdir>)

  dir     │ create snapshot of <dir>
  tag     │ name the snapshot <tag>_<timestamp>
  limit   │ keep <limit> snapshots with this tag. 0 to disable
  seconds │ don't create snapshots before <seconds> have passed from last with this tag. 0 to disable
  destdir │ store snapshot in <destdir>, path absolute or relative to <dir>

Examples

Manual

Snapshot of home

# btrfs-snp /home

Tagged snapshot of root

# btrfs-snp / preupgrade

Tagged snapshot of root, but keep maximum 10

# btrfs-snp / preupgrade 10

Cron

Hourly snapshot for one day, daily for one week, weekly for one month, and monthly for one year.

# cat > /etc/cron.hourly/btrfs-snp <<EOF
#!/bin/bash
/usr/local/sbin/$BIN /home hourly  24 3600
/usr/local/sbin/$BIN /home daily    7 86400
/usr/local/sbin/$BIN /home weekly   4 604800
/usr/local/sbin/$BIN /     weekly   4 604800
/usr/local/sbin/$BIN /home monthly 12 2592000
EOF
chmod +x /etc/cron.hourly/btrfs-snp

Inspired by btrfs-snap by Birger Monsen

More at ownyourbits.com

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].