Initial commit. Included are scripts to initialize the mariaDB or Neo4J databases, the entrypoint and backup for the web version, and the podman compose.yaml file.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
BACKUP_DIR="/var/www/html/backups"
|
||||
BACKUP_FILE="${BACKUP_DIR}/db_backup_$(date +%Y-%m-%d_%H-%M-%S).sql.gz"
|
||||
|
||||
echo "Starting database backup..."
|
||||
|
||||
# Ensure the backup directory exists
|
||||
mkdir -p ${BACKUP_DIR}
|
||||
|
||||
# Dump the database, gzip it, and save to the file
|
||||
mariadb-dump -h ${MARIADB_HOST} -u ${MARIADB_USER} -p${MARIADB_PASSWORD} ${MARIADB_DATABASE} | gzip > ${BACKUP_FILE}
|
||||
|
||||
echo "Backup created at ${BACKUP_FILE}"
|
||||
|
||||
# TODO: Setup rclone to Google Drive? Or a seperate server?
|
||||
Reference in New Issue
Block a user