From 3d7ad39aed63940d2ce095cc4f58d07acc4974f8 Mon Sep 17 00:00:00 2001 From: wbudic Date: Mon, 4 Mar 2019 12:55:37 +1100 Subject: [PATCH] Backup script for the local machine. --- backupDBLifeLog.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 backupDBLifeLog.sh diff --git a/backupDBLifeLog.sh b/backupDBLifeLog.sh new file mode 100755 index 0000000..7a675c8 --- /dev/null +++ b/backupDBLifeLog.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# +# Following is an hardcoded script that can be used on your local machine +# to archive from server all the latest SQLite databases on the DB Life Log server. +# +# Usefull to cron, to auto backup the databases just in case. +# +# Programed by: Will Budic +# Open Source License -> https://choosealicense.com/licenses/isc/ +DIR="/home/will/Documents/dbLifeLog" +NOW=`date +%Y%m%d` + +if [ ! -d "$DIR" ]; then + mkdir $DIR +fi +cd $DIR + +sftp will@nuc:/home/will/thttpd_dev/dbLifeLog/ <