No description
Find a file
2026-01-19 14:49:03 +03:00
.github/workflows Log messages translated to English. Log format improved. Fixed db parsing. 2023-08-02 14:20:43 +03:00
backup changed the way how the cleanup logic worked 2026-01-19 14:49:03 +03:00
clog added email - updated config sample - added s3fs 2024-03-13 16:14:18 +03:00
config added the option to change the part size 2025-12-03 16:17:26 +03:00
notify fixed logic error that affects email notifications 2024-10-03 12:53:00 +03:00
.gitignore stream backups directly to s3 2024-06-25 17:44:57 +03:00
.goreleaser.yaml dev branch initial 2024-02-27 17:06:40 +03:00
go.mod Implemented rotation cleanup for local, S3 and Rsync, 2026-01-02 16:17:11 +03:00
go.sum Implemented rotation cleanup for local, S3 and Rsync, 2026-01-02 16:17:11 +03:00
LICENSE Log messages translated to English. Log format improved. Fixed db parsing. 2023-08-02 14:20:43 +03:00
main.go added retry option for failed databases 2025-11-28 15:43:53 +03:00
README.md Update README.md 2024-03-12 17:17:49 +03:00
README.tr.md Initial commit after fork 2023-12-26 14:16:37 +03:00

Contributors Forks Stargazers Issues GPL License

Readme in English Readme in Turkish

monodb-backup

monodb-backup is a tool for backing up MySQL and PostgreSQL databases.

Table of Contents


Features

  • Backs up and encrypts all databases or a custom list of databases.
  • Supports local backups and cloud storage options like S3 or Minio.
  • Option to remove old local backups for efficient storage management.
  • Provides notifications through email for monitoring backups.

Usage

  1. Configure monodb-backup by editing the config file (default is /etc/monodb-backup.yml )

  2. Run the backup using the following command as the postgres user:

monodb-backup

Backups will be created for each database based on the configuration. For local backups, ensure that you define a backup folder with appropriate permissions.


Dependencies

  • p7zip

Configuration

The configuration file is in YAML format. The available options are:

  • backupDestination - Local backup folder path
  • databases - List of database names to back up, if empty all databases are backed up
  • removeLocal - Remove old local backups if true
  • archivePass - Password to use for encrypting backups with 7z
  • s3 - S3 configuration for backups
  • minio - Minio configuration for backups
  • notify - Email and webhook url notification configuration
  • log - Logging configuration

See config/config.sample.yml for an example configuration file.


Building

To build monodb-backup:

CGO_ENABLED=0 go build -ldflags '-extldflags "-static"'

License

monodb-backup is GPL-3.0 licensed. See LICENSE file for details.