1
0
mirror of https://github.com/xzeldon/vwdump.git synced 2025-07-16 07:14:41 +03:00

Remove old backups (#11)

- Added `delete` script 🎉.
  - `DELETE_AFTER` variable must be greater than `0`.
This commit is contained in:
jmqm
2021-07-13 22:04:46 -05:00
committed by GitHub
parent 438a72650c
commit fcda17fc09
2 changed files with 25 additions and 8 deletions

10
delete.sh Normal file
View File

@ -0,0 +1,10 @@
#!/bin/sh
# Go to the backups directory.
cd /backups
# Delete tar.xz archives older than x days.
find . -iname "*.tar.xz" -type f -mtime +$DELETE_AFTER -exec rm -f {} \;
# Echo that script ran.
echo "Deleted files older than $DELETE_AFTER days."