add: backup script for boogie

This commit is contained in:
Robert Wartenberg committed 2023-10-04 09:21:03 +02:00
1 parent 6da6e5d296
commit 32e2daf666
1 file changed
+19 -22
+19 -22
View File
@@ -1,37 +1,34 @@
#!/bin/sh #!/bin/sh
# this one makes a copy of the whole /var/www/html from boogiedev # this one makes a copy of the whole /var/www/html from boogie to BFDS
todo!
SCRIPTPATH=$(dirname `realpath $0`) SCRIPTPATH=$(dirname `realpath $0`)
cd $SCRIPTPATH cd $SCRIPTPATH
# rsync source -> destination # rsync source -> destination
SOURCE_PATH=/var/www/virtual/boogie/html SOURCE_PATH=/var/www/virtual/boogie/html
DEST_PATH_FILES=/mnt/bfds/rob/backup/server/boggiedev.net/var_www DEST_PATH_FILES=/mnt/bfds/rob/backup/server/boogiedev.net/var_www
# # ssh credentials
PORT="22"
KEY="${SCRIPTPATH}/boogie_keyless"
USER_AT_HOST="boogie@spaceboyz.net"
# path of the database backups # path of the database backups
DEST_PATH_DB=/mnt/bfds/rob/backup/server/spaceboyz.net/mariadb DEST_PATH_DB=/mnt/bfds/rob/backup/server/boogiedev.net/db
# EXCLUDE="--exclude-from exclude-list" # EXCLUDE="--exclude-from exclude-list"
# ### Get all databases # ### Get all databases
# cd $DEST_PATH_DB # kick off DB dumping
# # kick off DB dumping curl --insecure --silent https://backup.boogiedev.net/dump_all_databases.php
# curl --insecure --silent https://rob.spaceboyz.net/backup_all_databases_cMxNrCTVLBPrNo6qaonojeejCvCepekwssh/dump_all_databases.php
# # download DB dumps # download DB dumps
# curl --insecure --silent https://rob.spaceboyz.net/backup_all_databases_cMxNrCTVLBPrNo6qaonojeejCvCepekwssh/dumps.zip > dumps.zip cd $DEST_PATH_DB
# if [ -f dumps.zip ] curl --insecure --silent https://backup.boogiedev.net/dumps.zip > dumps.zip
# then if [ -f dumps.zip ]
# today=`date +%F` then
# mv dumps.zip all_databases_dump_$today.zip today=`date +%F`
# else mv dumps.zip all_databases_dump_$today.zip
# echo "Datenbank Dump konnte nicht herunter geladen werden" else
# fi 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