{"id":13928886,"url":"https://github.com/tachtler/dovecot-backup","last_synced_at":"2025-07-19T10:32:16.922Z","repository":{"id":54387892,"uuid":"67703733","full_name":"tachtler/dovecot-backup","owner":"tachtler","description":"Dovecot backup shell script for saving emails for every mailbox to its own tar.gz file.","archived":false,"fork":false,"pushed_at":"2023-07-05T14:31:29.000Z","size":140,"stargazers_count":54,"open_issues_count":0,"forks_count":19,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-08-08T18:20:19.032Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tachtler.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-08T13:03:55.000Z","updated_at":"2024-07-06T06:42:34.000Z","dependencies_parsed_at":"2023-01-20T15:25:14.725Z","dependency_job_id":null,"html_url":"https://github.com/tachtler/dovecot-backup","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tachtler%2Fdovecot-backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tachtler%2Fdovecot-backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tachtler%2Fdovecot-backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tachtler%2Fdovecot-backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tachtler","download_url":"https://codeload.github.com/tachtler/dovecot-backup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226588859,"owners_count":17655798,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-07T18:01:58.385Z","updated_at":"2024-11-26T17:31:06.855Z","avatar_url":"https://github.com/tachtler.png","language":"Shell","funding_links":[],"categories":["others"],"sub_categories":[],"readme":"# dovecot-backup\nThis is a shell script for saving up all emails from the mailboxes of Dovecot (MDA) to an email mailbox specific archive file in ``tar.gz`` **or** ``tar.zst`` format.\n\nThis simple bash/shell script save the emails\n- **DEFAULT** from all mailboxes/user accounts, determined with ``doveadm user \"*\"``\n- **OR** only from these mailboxes/user accounts, which are stored in a file.\n- every mailbox/user into a separate ``*.tar.gz`` or ``*.tar.zst`` file\n- reading the data from the filesystem\n- with configurable parameter\n- with automatic deletion of old backup-files\n- and with logging into a growing up log file under ``/var/log``\n- with **statistic summary** at the end of the script execution\n- with **runtime summary** at the end of the script execution\n- on **successful execution** a LOG file will be written, or configurable a message will be send by e-mail.\n- on **error while execution**, a LOG file will be written and an error message will be send by e-mail.\n\nA more confortable and detailed description is available under following link:\n\nhttp://www.dokuwiki.tachtler.net/doku.php?id=tachtler:dovecot_backup_-_skript\n\n(Sorry, by now, only avaliable in **German language**)\n\nFull description of **all** the parameter to set **to get the script to work**, inside the top part of the script:\n\n```\n##############################################################################\n# \u003e\u003e\u003e Please edit following lines for personal settings and custom usages. ! #\n##############################################################################\n\n# CUSTOM - Script-Name.\nSCRIPT_NAME='dovecot_backup'\n\n# CUSTOM - Backup-Files compression method - (possible values: gz zst).\nCOMPRESSION='gz'\n\n# CUSTOM - Backup-Files.\nTMP_FOLDER='/srv/backup'\nDIR_BACKUP='/srv/backup'\nFILE_BACKUP=dovecot_backup_`date '+%Y%m%d_%H%M%S'`.tar.$COMPRESSION\nFILE_DELETE=$(printf '*.tar.%s' $COMPRESSION)\nBACKUPFILES_DELETE=14\n\n# CUSTOM - dovecot Folders.\nMAILDIR_TYPE='maildir'\nMAILDIR_NAME='Maildir'\nMAILDIR_USER='vmail'\nMAILDIR_GROUP='vmail'\n\n# CUSTOM - Path and file name of a file with e-mail addresses to backup, if\n#          SET. If NOT, the script will determine all mailboxes by default.\n# FILE_USERLIST='/path/and/file/name/of/user/list/with/one/user/per/line'\n# - OR -\n# FILE_USERLIST=''\nFILE_USERLIST=''\n\n# CUSTOM - Check when FILE_USERLIST was used, if the user per line was a\n#          valid e-mail address [Y|N].\nFILE_USERLIST_VALIDATE_EMAIL='N'\n\n# CUSTOM - Mail-Recipient.\nMAIL_RECIPIENT='you@example.com'\n\n# CUSTOM - Status-Mail [Y|N].\nMAIL_STATUS='N'\n```\n\n##### **Note**: The script doesn't work with Multi-dbox (mdbox). BUT following changes can solve that issue:\n\nPlease change/replace the line\n```\n$DSYNC_COMMAND -o plugin/quota= -f -u $users backup $MAILDIR_TYPE:$LOCATION\n```\nwith\n```\ndoveadm backup -n inbox -f -u $users $MAILDIR_TYPE:$LOCATION:LAYOUT=fs\n```\n\n```Issue #6``` - Thanks to SvenSFS\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftachtler%2Fdovecot-backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftachtler%2Fdovecot-backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftachtler%2Fdovecot-backup/lists"}