Add Data base backup /export #383
Replies: 1 comment
-
This is a .sh file for a database backup script with Discord functions. I made the echo in Dutch but that does not effect anything #!/bin/bash backup_dir="" # Set this to the directory you want to back it up to current_date=$(date +"%d-%m-%Y_%H-%M-%S") databases=$(mysql -h "$remote_server" -u "$remote_mysql_user" -p"$remote_mysql_password" -e "SHOW DATABASES;" | grep -Ev "(Database|information_schema|performance_schema|mysql)") touch "$log_file" for db in $databases; do echo "Backups zijn successvol gemaakt en in $backup_dir gestopt. Ook zijn alle bestanden naar Discord gestuurd met $WEBHOOK_URL ." | tee -a "$log_file" |
Beta Was this translation helpful? Give feedback.
-
What this would be able to do is maybe have a section were people have a section to have there database export or backup in some type of way. Either externaly or were they can download it to there local machine.
Beta Was this translation helpful? Give feedback.
All reactions