{"id":13473864,"url":"https://github.com/joeyates/imap-backup","last_synced_at":"2026-02-12T02:01:21.017Z","repository":{"id":3553625,"uuid":"4614540","full_name":"joeyates/imap-backup","owner":"joeyates","description":"Backup and Migrate IMAP Email Accounts","archived":false,"fork":false,"pushed_at":"2025-04-02T08:25:27.000Z","size":2580,"stargazers_count":1526,"open_issues_count":10,"forks_count":78,"subscribers_count":21,"default_branch":"main","last_synced_at":"2025-04-28T10:57:26.604Z","etag":null,"topics":["backup","imap","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joeyates.png","metadata":{"files":{"readme":".github/README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["joeyates"]}},"created_at":"2012-06-10T11:22:37.000Z","updated_at":"2025-04-24T19:51:34.000Z","dependencies_parsed_at":"2024-01-13T03:01:05.182Z","dependency_job_id":"c68df66b-6673-40bc-b272-eb67f875bc7c","html_url":"https://github.com/joeyates/imap-backup","commit_stats":{"total_commits":1371,"total_committers":13,"mean_commits":"105.46153846153847","dds":"0.013129102844638973","last_synced_commit":"97bd7a659a9d095861806e28daf25934b46868a4"},"previous_names":[],"tags_count":135,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeyates%2Fimap-backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeyates%2Fimap-backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeyates%2Fimap-backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeyates%2Fimap-backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joeyates","download_url":"https://codeload.github.com/joeyates/imap-backup/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254140769,"owners_count":22021220,"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":["backup","imap","ruby"],"created_at":"2024-07-31T16:01:07.558Z","updated_at":"2026-02-12T02:01:21.011Z","avatar_url":"https://github.com/joeyates.png","language":"Ruby","funding_links":["https://github.com/sponsors/joeyates"],"categories":["Ruby","ruby","Uncategorized"],"sub_categories":["Uncategorized"],"readme":"![Version](https://img.shields.io/gem/v/imap-backup?label=Version\u0026logo=rubygems)\n[![Build Status](https://github.com/joeyates/imap-backup/actions/workflows/main.yml/badge.svg)][CI Status]\n![Coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/joeyates/b54fe758bfb405c04bef72dad293d707/raw/coverage.json)\n![License](https://img.shields.io/github/license/joeyates/imap-backup?color=brightgreen\u0026label=License)\n[![Stars](https://img.shields.io/github/stars/joeyates/imap-backup?style=social)][GitHub Stars]\n![Activity](https://img.shields.io/github/last-commit/joeyates/imap-backup/main)\n\n# imap-backup\n\nBackup, restore and migrate email accounts.\n\n# Quick Start\n\n```sh\nbrew install imap-backup # for macOS\ngem install imap-backup --no-document # for Linux\nimap-backup setup\nimap-backup\n```\n\n# Modes\n\nThere are two types of backups:\n\n* Keep all (the default) - progressively saves a local copy of all emails,\n* Mirror - adds and deletes emails from the local copy to keep it up to date with the account.\n\n# What You Can Do with a Backup\n\n* Copy - copy messages from one account to another, tracking copies in order to avoid duplicates.\n* Restore - push the local copy back to the original account.\n\nSee below for a [full list of commands](#commands).\n\n# Installation\n\n\u003cdetails\u003e\n\u003csummary\u003eDocker or Podman\u003c/summary\u003e\nIf you have Docker or Podman installed, the easiest way to use imap-backup\nis via the container image.\n\nYou'll need to choose a path on your computer where your backups will be saved,\nwe'll use `./my-data` here.\n\nIf you have just one account, you can do as follows\n\n```sh\ndocker run \\\n  --volume ./my-data:/data \\\n  --dns 8.8.8.8 \\\n  ghcr.io/joeyates/imap-backup:latest \\\n  imap-backup single backup \\\n    --email me@example.com \\\n    --password mysecret \\\n    --server imap.example.com \\\n    --path /data/me_example.com\n```\n\nPodman will work exactly the same.\n\nNotes:\n\n* If you're using Docker, add `--user $(id -u):$(id -g)` so that the files\n  created by the container are owned by you and not by root,\n* Pass imap-backup the `--password-environment-variable=VARIABLE_NAME` or\n  `--password-file=FILE` option to avoid having your password in\n  the command line history:\n\n```sh\ndocker run --env THE_PASSWORD=$THE_PASSWORD \\\n  ... \\\n  imap-backup single backup \\\n    --password-environment-variable=THE_PASSWORD \\\n    ...\n```\n\nor\n\n```sh\ndocker run \\\n  ... \\\n  imap-backup single backup \\\n    --password-file=/data/password.txt \\\n    ...\n```\n\nIf you have multiple accounts, you can create a configuration file.\n\nYou'll need to choose a path on your computer where your configuration will be saved,\nwe'll use `./my-config` here.\n\nFirst, run the menu-driven setup program to configure your accounts\n\n```sh\ndocker run \\\n  --volume ./my-config:/config \\\n  --volume ./my-data:/data \\\n  --dns 8.8.8.8 \\\n  --tty \\\n  --interactive \\\n  ghcr.io/joeyates/imap-backup:latest \\\n  imap-backup setup \\\n    --config /config/imap-backup.json\n```\n\nThen, run the backup\n\n```sh\ndocker run \\\n  --volume ./my-config:/config \\\n  --volume ./my-data:/data \\\n  --dns 8.8.8.8 \\\n  ghcr.io/joeyates/imap-backup:latest \\\n  imap-backup backup \\\n    --config /config/imap-backup.json\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eHomebrew (macOS)\u003c/summary\u003e\n  \n![Homebrew installs](https://img.shields.io/homebrew/installs/dm/imap-backup?label=Homebrew%20installs)\n\nIf you have [Homebrew](https://brew.sh/), do this:\n\n```sh\nbrew install imap-backup\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eAs a Ruby Gem\u003c/summary\u003e\n  \n* [Rubygem]\n\n```sh\ngem install imap-backup --no-document\n```\n\nIf that doesn't work, see the [detailed installation instructions](/docs/installation/rubygem.md).\n\n[Rubygem]: https://rubygems.org/gems/imap-backup \"Ruby gem at rubygems.org\"\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eFrom Source Code\u003c/summary\u003e\n  \nIf you want to use imap-backup directly from the source code, see [here](/docs/installation/source.md).\n  \n\u003c/details\u003e\n\n# Setup\n\nNormally you will want to backup a number of email accounts.\nDoing so requires the creation of a config file.\n\nYou do this via a menu-driven command line program:\n\nRun:\n\n```sh\nimap-backup setup\n```\n\nAs an alternative, if you only want to backup a single account,\nyou can pass all the necessary parameters directly to the `single backup` command\n(see the [`single backup`](/docs/commands/single-backup.md) docs).\n\n## GMail\n\nTo use imap-backup with GMail, Office 365 and other services that require\nOAuth2 authentication, you can use [email-oauth2-proxy](https://github.com/simonrob/email-oauth2-proxy).\nSee [this blog post about using imap-backup with email-oauth2-proxy](https://joeyates.info/posts/back-up-gmail-accounts-with-imap-backup-using-email-oauth2-proxy/).\n\n# Backup\n\nManually, from the command line:\n\n```sh\nimap-backup\n```\n\nAlternatively, add it to your crontab.\n\nBackups can also be inspected, for example via [`local show`](/docs/commands/local-show.md)\nand exported via [`utils export-to-thunderbird`](/docs/commands/utils-export-to-thunderbird.md).\n\n# Commands\n\n* [`backup`](/docs/commands/backup.md)\n* [`copy`](/docs/commands/copy.md)\n* [`local accounts`](/docs/commands/local-accounts.md)\n* [`local check`](/docs/commands/local-check.md)\n* [`local folders`](/docs/commands/local-folders.md)\n* [`local list`](/docs/commands/local-list.md)\n* [`local show`](/docs/commands/local-show.md)\n* [`remote folders`](/docs/commands/remote-folders.md)\n* [`restore`](/docs/commands/restore.md)\n* [`setup`](/docs/commands/setup.md)\n* [`single backup`](/docs/commands/single-backup.md)\n* [`utils export-to-thunderbird`](/docs/commands/utils-export-to-thunderbird.md)\n* [`utils ignore-history`](/docs/commands/utils-ignore-history.md)\n\nFor a full list of available commands, run\n\n```sh\nimap-backup help\n```\n\nFor more information about a command, run\n\n```sh\nimap-backup help COMMAND\n```\n\n# Performance\n\nThere are a couple of performance tweaks that you can use\nto improve backup speed.\n\nThese are activated via two settings:\n\n* Global setting \"Delay download writes\",\n* Account setting \"Multi-fetch size\".\n\nSee [the performance document](/docs/performance.md) for more information.\n\n# Troubleshooting\n\nIf you have problems:\n\n1. ensure that you have the latest release,\n2. run `imap-backup` with the `-v` or `--verbose` parameter.\n\n# Development\n\nSee the [Developer Documentation].\n\n[Developer Documentation]: https://rubydoc.info/gems/imap-backup \"Developer Documentation at Rubydoc.info\"\n[GitHub Stars]: https://github.com/joeyates/imap-backup/stargazers \"GitHub Stars\"\n[CI Status]: https://github.com/joeyates/imap-backup/actions/workflows/main.yml\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeyates%2Fimap-backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoeyates%2Fimap-backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeyates%2Fimap-backup/lists"}