init commit borg

This commit is contained in:
lhahn committed 2024-06-23 15:40:46 +02:00
1 parent 36ed650628
commit de2d7c8e69
14 files changed
+73 -297

No files matched your search

@@ -0,0 +1,20 @@
#!/bin/bash
RUNFOLDER="{{ backup_run_folder }}";
TARGETFOLDER="{{ backup_storage }}";
REPOLOCATION="{{ borg_location }}";
ARCHIVENAME="mailcow-$(date '+%s')";
cd $RUNFOLDER;
MAILCOW_BACKUP_LOCATION="$TARGETFOLDER/" ./helper-scripts/backup_and_restore.sh backup all;
LATESTBACKUP="$(ls -t $TARGETFOLDER | head -n 1)";
if [[ "$LATESTBACKUP" != *"mailcow"* ]];
then
echo "NOT MAILCOW! ABORT!";
exit 1;
fi
borg create -C lzma $REPOLOCATION::$ARCHIVENAME $TARGETFOLDER/$LATESTBACKUP;
rm -rf $TARGETFOLDER/$LATESTBACKUP;
+1
View File
@@ -0,0 +1 @@
#!/bin/bash
+2
View File
@@ -0,0 +1,2 @@
#!/bin/bash