mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-23 00:05:09 +00:00
- Introduced backup scripts for S3 and Google Drive, including cron job setup for automated backups. - Added email configuration script to set up SMTP settings for ERPNext. - Created environment files for backup configurations (backup.env, gdrive-backup.env, email.env). - Updated docker-compose files to support new backup services and configurations.
13 lines
No EOL
435 B
Bash
Executable file
13 lines
No EOL
435 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# Add cron job to run Google Drive backup daily at 2 AM
|
|
CRON_JOB="0 2 * * * $(pwd)/run-gdrive-backup.sh >> $(pwd)/gdrive-backup.log 2>&1"
|
|
|
|
# Check if cron job already exists
|
|
if crontab -l 2>/dev/null | grep -q "run-gdrive-backup.sh"; then
|
|
echo "Google Drive backup cron job already exists"
|
|
else
|
|
# Add new cron job
|
|
(crontab -l 2>/dev/null; echo "$CRON_JOB") | crontab -
|
|
echo "Google Drive backup cron job added"
|
|
fi |