diff options
author | Daniel Hansson <github@hanssonit.se> | 2022-03-27 00:04:58 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-27 00:04:58 +0300 |
commit | 6c03ab9e00945e3a6be88d644e3ade3d4c9c6773 (patch) | |
tree | a35b15d02710b74b79f65813bce78b172a9b115a /disk | |
parent | 27d1e4d148c8d3bf054bdbaf95d9daa198a6ad27 (diff) |
add daily zfs prune check (#2266)
Diffstat (limited to 'disk')
-rw-r--r-- | disk/prune_zfs_snaphots.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/disk/prune_zfs_snaphots.sh b/disk/prune_zfs_snaphots.sh index 8598d50f..9f9b958d 100644 --- a/disk/prune_zfs_snaphots.sh +++ b/disk/prune_zfs_snaphots.sh @@ -57,8 +57,15 @@ The script will also delete everything in trashbin for all users to free up some then mkdir -p "$VMLOGS" fi + # Prune snapshots touch $VMLOGS/zfs_prune.log ./zfs-prune-snapshots.sh 2d ncdata >> $VMLOGS/zfs_prune.log + # Create daily prune to avoid disk being full again + if [ ! -f "$SCRIPTS/daily-zfs-prune.sh" ] + then + run_script DISK create-daily-zfs-prune + fi + # Empty trashbin nextcloud_occ trashbin:cleanup --all-users >> $VMLOGS/zfs_prune.log fi fi |