Skip to content

Backing up the index

Matthieu Rakotojaona edited this page Mar 14, 2015 · 4 revisions

In case you or sup crashes the index it is nice to have a backup to restore the index from, to keep labels and message state.

The tool sup-dump can do this, and you can restore the backup using sup-sync. It can be useful to set up a cronjob backing the index up regularly, a daily backup script (called by a crontab job) might look like this:

#! /bin/bash

# Make a backup of the sup index

date=$(date "+%Y%m%d")

echo -n "dumping to: ~/.backup/sup/sup-index-${date}.xz.."
sup-dump | xz > "/home/${HOME}/.backup/sup/sup-index-${date}.xz"
echo done

which puts the backups in the directory ~/.backup/sup.

Full copy of sup state

Sup's files are stored in two directories:

  • Configuration files are in $XDG_CONFIG_HOME/sup
  • Data files are in $XDG_DATA_HOME/sup

If you want to back up the full state of sup make a copy of both directories. The mail files are not covered by this, if you are using any of the sync back functionality of sup, your mail files might be modified. Back those up accordingly to how you store them.

Clone this wiki locally