* Removed unused get note diff function. It doesn't work because everything is encrypted now
* Added a script to sync down the prod database and files to dev
This commit is contained in:
1 parent
941d21d9cb
commit
c7e342be4d
6 files changed
+62
-85
No files matched your search
+13
-3
@@ -1,18 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
BACKUPDIR="/home/mab/databaseBackupPi"
|
||||
BACKUPDIR="/home/mab/databaseBackupSolidScribe"
|
||||
|
||||
mkdir -p $BACKUPDIR
|
||||
cd $BACKUPDIR
|
||||
|
||||
NOW=$(date +"%Y-%m-%d_%H-%M")
|
||||
ssh [email protected] -p 13328 "mysqldump --all-databases --user root -p***REMOVED***" > "backup-$NOW.sql"
|
||||
ssh [email protected] -p 13328 "mysqldump --all-databases --single-transaction --user root -p***REMOVED***" > "backup-$NOW.sql"
|
||||
gzip "backup-$NOW.sql"
|
||||
|
||||
cp "backup-$NOW.sql" "/mnt/Windows Data/DatabaseBackups/backup-$NOW.sql"
|
||||
|
||||
echo "Database Backup Complete on $NOW"
|
||||
|
||||
#Restore DB
|
||||
##
|
||||
# Restore DB
|
||||
##
|
||||
|
||||
# copy file over, run restore
|
||||
# scp -P 13328 backup-2019-12-04_03-00.sql [email protected]:/home/mab
|
||||
# mysql -u root -p < backup-2019-12-04_03-00.sql
|
||||
|
||||
##
|
||||
# Crontab setup
|
||||
##
|
||||
|
||||
# 0 2 * * * /bin/bash /home/mab/ss/backupDatabase.sh 1> /home/mab/databaseBackupLog.txt
|
||||
Reference in new issue
Block a user