• Stars
    star
    1,365
  • Rank 34,436 (Top 0.7 %)
  • Language
    Ruby
  • License
    MIT License
  • Created over 12 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Backup and Migrate IMAP Email Accounts

Version Build Status Coverage License

imap-backup

Backup, restore and migrate email accounts.

Modes

There are two types of backups:

  • Keep all (the default) - progressively saves a local copy of all emails,
  • Mirror - adds and deletes emails from the local copy to keep it up to date with the account.

What You Can Do with a Backup

  • Migrate - use the local copy to populate emails on another account. This is a once-only action that deletes any existing emails on the destination account.
  • Mirror - make a destination account match the local copy. This action can be repeated.
  • Restore - push the local copy back to the original account.

See below for a full list of commands.

Installation

Homebrew (macOS)

If you have Homebrew, do this:

brew install imap-backup

As a Ruby Gem

gem install imap-backup

If that doesn't work, see the detailed installation instructions.

From Source Code

If you want to use imap-backup directly from the source code, see here.

Setup

As a first step, you need to add accounts via a menu-driven command line program:

Run:

imap-backup setup

GMail

To use imap-backup with GMail, you will need to enable 'App passwords' on your account.

Backup

Manually, from the command line:

imap-backup

Alternatively, add it to your crontab.

Backups can also be inspected, for example via local show and exported via utils export-to-thunderbird.

Commands

For a full list of available commands, run

imap-backup help

For more information about a command, run

imap-backup help COMMAND

Performace

There are a couple of performance tweaks that you can use to improve backup speed.

These are activated via two settings:

  • Global setting "Delay download writes"
  • Account setting "Multi-fetch size"

As with all performance tweaks, there are trade-offs. If you are using a small virtual server or Raspberry Pi to run your backups, you will probably want to leave the deafult settings. If, on the other hand, you are using a computer with a fair bit of RAM, and you are dealing with a lot of email, then changing these settings may be worthwhile.

Delay download writes

This setting affects all account backups.

When not set, each message is written to disk, one at a time. Doing so means the message itself is appended to the MBox file, but more importantly, the JSON metadata is rewritten to disk from scratch.

When in use, all of a mailboxes unbackupped messages are downloaded first, and then written to disk just once.

This speeds up backup as the metadata file is not rewritten after each message is added, but it potentially uses much more memory.

Multi-fetch Size

By default, during backup, each message is downloaded one-by-one.

Using this setting, you can download chunks of emails at a time, potentially speeding up the process.

If you're not using "Delayed downlaod writes", using multi-fetch will mean that the backup process will use more memory - equivalent to the size of the greater number of messages downloaded at a time.

This behaviour may also exceed limits on your email provider, so it's best to check before cranking it up!

Troubleshooting

If you have problems:

  1. ensure that you have the latest release,
  2. run imap-backup with the -v or --verbose parameter.

Development

See the Development documentation for notes on development and testing.

See the CHANGELOG to a list of changes that have been made in each release.

More Repositories

1

rake-builder

Rake for C, C++, Objective-C and Objective-C++ Projects
Ruby
46
star
2

ruby-sun-times

Calculate sunrise and sunset times for a given time and place
Ruby
44
star
3

metar-parser

A Ruby library for METAR weather reports
Ruby
40
star
4

cpp-active-record

A C++ Implementation of the Active Record Pattern
C++
34
star
5

exdm

Deploy Elixir applications via mix tasks
Elixir
12
star
6

gdata-backup

Download Google Docs from the command line
Ruby
8
star
7

sloccount-clojure

Count lines of code, language by language
Clojure
6
star
8

c-plus-plus-study

Experiments with the intricacies of C++
C++
6
star
9

mix_task_example

An Eiixir project as a howto for mix task creation
Elixir
5
star
10

m9t

A Ruby Gem for Measurements
Ruby
5
star
11

html-photo-frame

An HTML and hand-rolled Javascript photo frame - just pass it a file with the list of images
JavaScript
5
star
12

elixir-datocms-client

An Elixir client for DatoCMS site and item info
Elixir
4
star
13

sinatra-address-book

Sinatra examples that appear in my Packtpub book (http://www.packtpub.com/sinatra-starter/book)
Ruby
4
star
14

expand

A pretty printer for Elixir
Elixir
4
star
15

capture_child_io

Capture child processes' :stdio in tests
Elixir
3
star
16

git-confident

Automate computer configuration backup
Ruby
3
star
17

beam_analyzer

Get information about an Erlang/Elixir BEAM module
Elixir
3
star
18

dokku-mediawiki-postgres

A Dockerfile configuration to run Mediawiki under Dokku
PHP
3
star
19

highline-test

A micro framework for running tests on HighLine applications
Ruby
3
star
20

home-cooking

My computer setup as a chef repo
Ruby
2
star
21

remote-session

Run user, and sudo, commands over an SSH connection
Ruby
2
star
22

middleman-caching-proxy

Speed up Middleman builds via a cache
Ruby
2
star
23

round_trip

Bidirectional sychronisation between Redmine and Trello
Ruby
2
star
24

sinatra-examples

Ruby
2
star
25

tamagotchi-elixir

An Elixir Tamagotchi game
Elixir
2
star
26

thunderbird

Conveniences for interacting with Mozilla Thunderbird
Ruby
2
star
27

chef-capistrano-rails

Chef resources for Capistrano Rails deployments
Ruby
2
star
28

exiffer

Read and update image metadata
Elixir
2
star
29

rightstuff

Another RightScale Ruby interface gem
Ruby
2
star
30

orbitals

Atomic electron configurations and orbitals
Elixir
2
star
31

multilingual

Localized routes for Elixir Phoenix applications, with and without LiveView.
Elixir
2
star
32

gprofiles

A web-based gprof analysis navigator
Ruby
1
star
33

sherpa

Sherpa File Manager
C++
1
star
34

smtp_tester

Test SMTP Servers from the Command line
Elixir
1
star
35

erlang-study

My Toy Erlang Programs
Erlang
1
star
36

guess-the-animal

The classic "Think of an animal" game
Ruby
1
star
37

aruba-turnip

Provides Turnip versions of Aruba's Cucumber step definitions
Ruby
1
star
38

gpex

Parse and create GPX Files
Elixir
1
star
39

package_manager

A package manager abstraction
Ruby
1
star
40

hello_gosu

Hello World for the Gosu 2d Game Library
Ruby
1
star
41

html5_canvas

Classes for HTML5 canvas: ContextMenu, Draggable
JavaScript
1
star
42

joeyates.github.io

Elixir
1
star
43

jasmine-rhino-reporters

Reporters for the Jasmine testing framework when running under Rhino
JavaScript
1
star
44

geo_marker

Set GPS on images by choosing a location on a map
1
star
45

chef-encrypted-data-bag-url

Ruby
1
star
46

ruby-inspector

Uses reflection to present information about Ruby's core classes
Ruby
1
star
47

ruboto_api

A web site for the ruboto API for Android
Ruby
1
star
48

vimrc

My vim setup
Vim Script
1
star
49

prismatic

Automate SitePrism's access to DOM elements
Ruby
1
star
50

joeyates.github.io.old

My blog
HTML
1
star
51

nvim-config

Lua
1
star
52

solar_edge

An Elixir client for the SolarEdge monitoring API
Elixir
1
star
53

helpful_options

A configurable command-line options parser
Elixir
1
star
54

dokku-dockerfile-deployments

Shell
1
star