aports/cron/postgresql/cron-daily

4 lines
185 B
Bash

#!/bin/sh
/sbin/btrfs subvolume delete /databases/snapshots/postgresql/`date +"%u"`
/sbin/btrfs subvolume snapshot -r /databases/postgresql /databases/snapshots/postgresql/`date +"%u"`