Doc Version: 0.9.0 📅 Last Updated: 2025-10-03 🕒
-- Single bash script hostflow.sh orchestrates backups, syncs, uploads, and verification.
- External tools:
rclone,imapsync,curl/sendmail.
| Component | Description |
|---|---|
| Config Block | User-editable settings grouped by source/target, domain, cloud, cron, verification, notifications |
| Backup Engine | File compression (tar), database export (mysqldump), email data archive (Maildir) |
| Email Sync | imapsync loop consuming ACCOUNTS_FILE |
| Cloud Uploads | rclone wrappers for Dropbox, Google Drive, OneDrive, S3 |
| Verification | HTTP GET to VERIFY_URL with result logging |
| Notifications | Summary generation and sending via SMTP/curl/sendmail |
| Control Panel Modes | Case-based dispatch with root-aware stubs |
| Logging & Errors | log_message, handle_error, STATUS tracking |
| Aspect | Details |
|---|---|
| Inputs | Config values, credentials file, environment |
| Artifacts | sitefiles_*.tar.gz, emaildata_*.tar.gz, *.sql, migration.log, optional checksum files |
| Outputs | Cloud uploads and email notifications |
- Config Consolidation: Ensure single user-editable block.
- Backup Tasks: Implement file backup, DB export, email archive with error handling.
- Email Sync Tasks: Implement
imapsyncloop; capture per-account results. - Cloud Upload Tasks: Conditional uploads to configured remotes.
- Verification Tasks: Call
VERIFY_URLand log outcome. - Notification Tasks: Generate summary, send via chosen transport.
- Control Panel Tasks: Implement DA2DA minimal; structure stubs for others with root checks.
- Cron Tasks: Optional installation based on
USE_CRONsettings. - Stats/Logs Tasks: Conditional backup and inclusion in summary.
- Fail fast on critical backup/export operations with
handle_error. - Continue non-critical tasks where safe; mark STATUS accordingly.
- Log all actions and errors with timestamps.
- Avoid logging sensitive passwords.
- Ensure backups are stored with appropriate permissions.
- Validate remote endpoints before data transfer.
- See
Config_Reference.mdfor details of the in-script configuration block and how settings map to components.
- Manual runs against test environments.
- Validate cloud uploads with
rclonecommands. - Verify email sync with sample accounts.
- Use cron for off-hours runs.
- Monitor
migration.logafter each run. - Keep
ACCOUNTS_FILEsecure.
Made with ❤️ by ReadyPixels LLC