34 lines
912 B
Bash
34 lines
912 B
Bash
#!/bin/sh
|
|
|
|
# this one makes a copy of the whole /var/www/html from boogie to BFDS
|
|
|
|
SCRIPTPATH=$(dirname `realpath $0`)
|
|
cd $SCRIPTPATH
|
|
|
|
# rsync source -> destination
|
|
SOURCE_PATH=/var/www/virtual/boogie/html
|
|
DEST_PATH_FILES=/mnt/bfds/rob/backup/server/boogiedev.net/var_www
|
|
|
|
# path of the database backups
|
|
DEST_PATH_DB=/mnt/bfds/rob/backup/server/boogiedev.net/db
|
|
|
|
# EXCLUDE="--exclude-from exclude-list"
|
|
|
|
# ### Get all databases
|
|
|
|
# kick off DB dumping
|
|
curl --insecure --silent https://backup.boogiedev.net/dump_all_databases.php
|
|
|
|
# download DB dumps
|
|
cd $DEST_PATH_DB
|
|
curl --insecure --silent https://backup.boogiedev.net/dumps.zip > dumps.zip
|
|
if [ -f dumps.zip ]
|
|
then
|
|
today=`date +%F`
|
|
mv dumps.zip all_databases_dump_$today.zip
|
|
else
|
|
echo "Datenbank Dump konnte nicht herunter geladen werden"
|
|
fi
|
|
|
|
## aufräumen
|
|
curl --insecure --silent https://backup.boogiedev.net/dump_all_databases.php?cleanup_dump=1 |