aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/cleanup-backup
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2015-03-20 01:35:16 +0100
committerDavid Runge <dave@sleepmap.de>2015-03-20 01:35:16 +0100
commitdc004352c28745e2156a4ef1d6582bfed2b05a82 (patch)
tree779ebdde959293e88969dc294a7b76531dd944c5 /scripts/cleanup-backup
parentfd3b4a68b7ba29e77a3147f8e5fced19eeb294d4 (diff)
downloadcrypted-backups-dc004352c28745e2156a4ef1d6582bfed2b05a82.tar.gz
crypted-backups-dc004352c28745e2156a4ef1d6582bfed2b05a82.tar.bz2
crypted-backups-dc004352c28745e2156a4ef1d6582bfed2b05a82.tar.xz
crypted-backups-dc004352c28745e2156a4ef1d6582bfed2b05a82.zip
cleanup-backup: Adding first version of cleanup-backup script, service and timer.
Diffstat (limited to 'scripts/cleanup-backup')
-rwxr-xr-xscripts/cleanup-backup4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/cleanup-backup b/scripts/cleanup-backup
new file mode 100755
index 0000000..af62b88
--- /dev/null
+++ b/scripts/cleanup-backup
@@ -0,0 +1,4 @@
+#!/usr/bin/env bash
+
+# Delete files in specified folder, older than "older_than" (in days)
+find $cleanup_folder -type f -atime +$older_than -print -exec rm {} \;