8 lines
372 B
Bash
Executable File
8 lines
372 B
Bash
Executable File
#!/bin/bash
|
|
# WEVADS Restore
|
|
BACKUP_DIR="$1"
|
|
[ -z "$BACKUP_DIR" ] && { echo "Usage: $0 /path/to/backup"; ls -dt /opt/wevads/backups/auto/*/* | head -10; exit 1; }
|
|
echo "Restoring from $BACKUP_DIR..."
|
|
[ -f "$BACKUP_DIR/db_adx_system.sql.gz" ] && gunzip -c "$BACKUP_DIR/db_adx_system.sql.gz" | psql -U postgres adx_system
|
|
echo "✅ Done. Restart: systemctl restart apache2"
|