- Created DATABASE_BACKUP_SETUP.md for detailed backup instructions - Implemented backup-databases.sh for automated database backups - Added logrotate configuration for managing backup logs - Developed setup scripts for user-specific backup configurations - Included error handling and logging in backup processes - Established cron job setup for automated backups - Provided examples and troubleshooting tips in documentation
13 lines
410 B
Bash
13 lines
410 B
Bash
#!/bin/bash
|
|
# Local logrotate script for tilbudgivern backups
|
|
# Can be run manually or via crontab as alex user
|
|
|
|
LOGROTATE_CONFIG="/mnt/HC_Volume_103713257/tilbudgivern/infra/logrotate.conf"
|
|
STATE_DIR="/mnt/HC_Volume_103713257/tilbudgivern/logs/logrotate-state"
|
|
|
|
# Create state directory if it doesn't exist
|
|
mkdir -p "$STATE_DIR"
|
|
|
|
# Run logrotate
|
|
/usr/sbin/logrotate -s "$STATE_DIR/status" "$LOGROTATE_CONFIG"
|