Debugging des SQL-Backups.
Anpassung von REAMDE
This commit is contained in:
parent
0e83949cff
commit
d984355a57
2 changed files with 15 additions and 12 deletions
|
@ -4,3 +4,6 @@ Froxlorbackup
|
||||||
Backup your Froxlor Webhosting to another server. Encrypted, via ssh.
|
Backup your Froxlor Webhosting to another server. Encrypted, via ssh.
|
||||||
|
|
||||||
Works until version 0.9.32.
|
Works until version 0.9.32.
|
||||||
|
|
||||||
|
SQL works now also for Versions > 0.9.32.
|
||||||
|
HTML is planned to be backed up with duplicity
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# 2013 by Mainboarder.de
|
# 2014 by Mainboarder.de
|
||||||
#
|
#
|
||||||
# Keep this comment untouched and do not use this software for military purposes.
|
# Keep this comment untouched and do not use this software for military purposes.
|
||||||
# you are allowed to use this just like you want on your own risk.
|
# you are allowed to use this just like you want on your own risk.
|
||||||
|
@ -7,13 +7,15 @@
|
||||||
# contains lines from http://menzerath.eu/artikel/froxlor-alle-datenbanken-und-verzeichnisse-sichern/
|
# contains lines from http://menzerath.eu/artikel/froxlor-alle-datenbanken-und-verzeichnisse-sichern/
|
||||||
#
|
#
|
||||||
|
|
||||||
path="var/customers/backups/"
|
temp="var/customers/temp-backup-path"
|
||||||
temp="var/customers/temp-backup-path/"
|
backuppath="/mnt/usb/backups"
|
||||||
encryption="path/to/enc.key"
|
encryption="/path/to/enc.key"
|
||||||
external="user@extern.server.de"
|
external="user@extern.server.de"
|
||||||
MYSQL_USER="root"
|
MYSQL_USER="root"
|
||||||
MYSQL_PASSWORD="root"
|
MYSQL_PASSWORD="root"
|
||||||
|
|
||||||
|
# Programm
|
||||||
|
|
||||||
# um <<tar - Entferne führende „/“ von Elementnamen>> zu vermeiden
|
# um <<tar - Entferne führende „/“ von Elementnamen>> zu vermeiden
|
||||||
cd /
|
cd /
|
||||||
|
|
||||||
|
@ -29,17 +31,15 @@ for db in $databases; do
|
||||||
done
|
done
|
||||||
|
|
||||||
# Alle SQL-Dumps in ein Archiv packen
|
# Alle SQL-Dumps in ein Archiv packen
|
||||||
tar cfvz $temp/backup-sql-$datum.tar.gz $temp
|
tar cfvz $temp/../backup-sql-$datum.tar.gz $temp
|
||||||
|
|
||||||
#Verschlüsseln und gepackte Datei löschen
|
#Verschlüsseln und gepackte Datei löschen
|
||||||
openssl aes-256-cbc -kfile $encryption -in backup-sql-$datum.tar.gz -out ./backup-sql-$datum.enc.tar.gz
|
openssl aes-256-cbc -kfile $encryption -in $temp/../backup-sql-$datum.tar.gz -out $temp/backup-sql-$datum.enc.tar.gz
|
||||||
|
|
||||||
rm backup-sql-$datum.tar.gz
|
rm $temp/../backup-sql-$datum.tar.gz
|
||||||
|
|
||||||
#Kopieren und verschlüsselte Datei löschen
|
#Kopieren und verschlüsselte Datei löschen
|
||||||
scp -i /etc/ssh/ssh_host_dsa_key ./backup-sql-$datum.enc.tar.gz $external:/mnt/usb/backups
|
scp -i /etc/ssh/ssh_host_dsa_key $temp/backup-sql-$datum.enc.tar.gz $external:$backuppath
|
||||||
|
|
||||||
rm backup-sql-$datum.enc.tar.gz
|
|
||||||
|
|
||||||
rm -r $temp
|
rm -r $temp
|
||||||
mkdir $temp
|
mkdir $temp
|
||||||
|
|
Loading…
Reference in a new issue