/docker-imap-backup

Dockerized imap-backup 🐳

Primary LanguageDockerfileApache License 2.0Apache-2.0

docker-imap-backup

github-actions github-release docker-image-size

Dockerized imap-backup.

imap-backup syncs IMAP as .mbox backup files, in contrast to isync which syncs IMAP as a Maildir (emails as individual files).

Tags

Tag Dockerfile Build Context
:15.0.2, :latest View
:14.6.1 View
:14.5.2 View
:14.4.5 View
:14.3.0 View
:14.2.0 View
:14.1.1 View
:14.0.0 View
:13.4.0 View
:13.3.0 View
:13.2.0 View
:13.1.0 View
:13.0.0 View
:12.1.0 View
:12.0.0 View
:11.1.0 View
:11.0.1 View
:10.0.1 View
:9.3.2 View
:9.2.0 View
:9.1.1 View
:9.0.2 View
:8.0.2 View
:7.0.2 View
:6.3.0 View
:6.2.1 View
:6.1.0 View
:6.0.1 View

Usage

See the following docker-compose examples:

# Print command line usage
docker run --rm -it theohbrothers/docker-imap-backup:15.0.2 help

# Interactive setup. See: https://github.com/joeyates/imap-backup/blob/main/docs/commands/setup.md
# 1. add account
#   1. email
#   2. password
#   3. server
#   4. connection options. For self-signed certs, use JSON: {"ssl": {"verify_mode": 0}}
#   5. test connection
#   13. Press (q) return to main menu
# 3. save and exit
docker run --rm -it -v imap-backup:/root/.imap-backup theohbrothers/docker-imap-backup:15.0.2 setup

# View backup config
docker run --rm -it -v imap-backup:/root/.imap-backup theohbrothers/docker-imap-backup:15.0.2 cat /root/.imap-backup/config.json

# Backup. See: https://github.com/joeyates/imap-backup/blob/main/docs/commands/backup.md
docker run --rm -it -v imap-backup:/root/.imap-backup theohbrothers/docker-imap-backup:15.0.2 backup

# Check backup integrity (not available on <= 9.2.0)
docker run --rm -it -v imap-backup:/root/.imap-backup theohbrothers/docker-imap-backup:15.0.2 local check

# Print backup stats
docker run --rm -it -v imap-backup:/root/.imap-backup theohbrothers/docker-imap-backup:15.0.2 stats <email>

# List backup files. See: https://github.com/joeyates/imap-backup/blob/main/docs/commands/backup.md
docker run --rm -it -v imap-backup:/root/.imap-backup theohbrothers/docker-imap-backup:15.0.2 ls -alR /root/.imap-backup

# Restore emails from backup to IMAP server. See: https://github.com/joeyates/imap-backup/blob/main/docs/commands/restore.md
docker run --rm -it -v imap-backup:/root/.imap-backup theohbrothers/docker-imap-backup:9.3.1 restore <email>

# Start a shell
docker run --rm -it -v imap-backup:/root/.imap-backup theohbrothers/docker-imap-backup:15.0.2 sh

Development

Requires Windows powershell or pwsh.

# Install Generate-DockerImageVariants module: https://github.com/theohbrothers/Generate-DockerImageVariants
Install-Module -Name Generate-DockerImageVariants -Repository PSGallery -Scope CurrentUser -Force -Verbose

# Edit ./generate templates

# Generate the variants
Generate-DockerImageVariants .

Variant versions

versions.json contains a list of Semver versions, one per line.

To update versions in versions.json:

./Update-Versions.ps1

To update versions in versions.json, and open a PR for each changed version, and merge successful PRs one after another (to prevent merge conflicts), and finally create a tagged release and close milestone:

$env:GITHUB_TOKEN = 'xxx'
./Update-Versions.ps1 -PR -AutoMergeQueue -AutoRelease

To perform a dry run, use -WhatIf.