frappe_docker/setup-gdrive-backup-cron.sh
Tushar 56cef5fe68 feat: add backup and email configuration scripts and environment files
- 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.
2025-03-20 10:44:25 +00:00

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