Skip to content

Instantly share code, notes, and snippets.

@zvpunry
zvpunry / rsnapshot_plug_rm_btrfs
Last active January 25, 2023 15:02
a small shell script that can be used within rsnapshot as cmd_rm. It provides snapshots generated with btrfs instead of hard-links
#!/bin/sh
# Original source: https://gist.github.com/wwerther/1306189
# Original documentation: http://web.archive.org/web/20190910001551/http://it.werther-web.de/2011/10/23/migrate-rsnapshot-based-backup-to-btrfs-snapshots
# Modified version: https://gist.github.com/zvpunry/af667816d63df089cd34f81458598b6f
#
# Arg 1: -rf
# Arg 2: /testbtrfs/backups/hourly.4/
# echo 1: $1 2: $@