Your IP : 216.73.217.79


Current Path : /var/www/cesa.co.za/python/
Upload File :
Current File : /var/www/cesa.co.za/python/run-backup.sh

#!/bin/bash
#
# Run database backup script using the virtual environment
#

# Get the directory where this script is located
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
VENV_DIR="${SCRIPT_DIR}/venv"
BACKUP_SCRIPT="${SCRIPT_DIR}/db-bck.py"

# Check if virtual environment exists
if [ ! -d "$VENV_DIR" ]; then
    echo "Error: Virtual environment not found. Please run setup-env.sh first."
    exit 1
fi

# Run the backup script using the virtual environment's Python
"${VENV_DIR}/bin/python" "$BACKUP_SCRIPT" "$@"