aboutsummaryrefslogtreecommitdiffstats
path: root/profiles
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@alpinelinux.org>2018-02-03 21:17:38 +0000
committerCarlo Landmeter <clandmeter@alpinelinux.org>2018-02-03 21:17:38 +0000
commitc48959c127d5cc1a67b46c1c7536d81d30c172e2 (patch)
tree29c00fd4824a01bffb39e2da550f3273d28e005d /profiles
parent4bdc1a801b89307f5b63e2f86edfad36ad5d7b06 (diff)
downloadalpine-backup-c48959c127d5cc1a67b46c1c7536d81d30c172e2.tar.bz2
alpine-backup-c48959c127d5cc1a67b46c1c7536d81d30c172e2.tar.xz
move note to top of profile
Diffstat (limited to 'profiles')
-rwxr-xr-xprofiles/backup-archive6
1 files changed, 5 insertions, 1 deletions
diff --git a/profiles/backup-archive b/profiles/backup-archive
index 623c7e1..7d7a81a 100755
--- a/profiles/backup-archive
+++ b/profiles/backup-archive
@@ -1,10 +1,14 @@
#!/bin/sh
+##################################################
+# Keep a montly copy on the first day of the month
+# This should run after the backup-sync profile
+##################################################
+
DATE=$(date -u "+%Y%m%d%H%M%S")
SRC="$(hostname).apkovl.tar.gz${SUFFIX}"
DEST="$(hostname).${DATE}.tar.gz${SUFFIX}"
-# Keep a montly copy on the first day of the month
if [ "$(date +%d)" = "01" ]; then
echo "Archiving montly backup"
ssh "$BACKUP_SERVER" install -Dm644 "$FQDN"/week/"$SRC" "$FQDN"/month/"$DEST"