Skip to content
This repository has been archived by the owner on Jun 21, 2021. It is now read-only.

Save your sanity by backing up your financial data - automatically! *Most batteries included.

Notifications You must be signed in to change notification settings

Tavlor/Firefly-III-Docker-Backup-Restore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Firefly III Docker - backup and restore scripts

Scripts I've developed to make my life easier. Mounts the volumes used by Firefly and produces tar archives (or unpacks archives, when restoring).

NOTE: I am not using or updating these scripts any more. You are more than welcome to fork this & adapt it to your needs. I never sorted out a proper way to export the databases - the script just copies files out of the volumes.

Learn more about Firefly III at https://www.firefly-iii.org/

Features

  • Checks that docker is running and the volumes exist before making backups (if a volume doesn't exist, an empty volume is created, which will wipe out an existing backup)
  • Can send push notifications for backup status - examples for a few OS's are included

Usage

Setup Steps

Backing Up

  • Close out of firefly III in your browser, but don't worry about stoping its containers.
  • Configure notifications: Edit notification () and errornotification () for your system. Make sure that lines for other OS's are commented out.

Restoring

  • stop your Firefly containers
  • Rename or remove any existing (corrupt/empty) Firefly volumes before running (be careful if testing! You CANNOT get volumes back! Consider copying your docker-compose.yml to a temporary folder, and using that prefix.)
    • to rename a volume (from this github comment):
       docker volume create --name <new_volume>
       docker run --rm -it -v <old_volume>:/from -v <new_volume>:/to alpine ash -c "cd /from ; cp -av . /to"
       docker volume rm <old_volume>
    • the script will not allow overwriting existing volumes, as a safety measure.

Running

Both commands have the same arguments:

./backup_firefly.sh <BACKUP DIRECTORY> <VOLUME PREFIX>

<VOLUME PREFIX> is optional Examples:

# not using a volume prefix
./restore_firefly.sh ~/backup/firefly
# docker-compose from a folder named `ffiii`
./restore_firefly.sh ~/backups/firefly/ ffiii
  • If you use docker-compose, the volume prefix is the name of the folder that holds your docker-compose.yml (i.e. if you launch firefly using ~/finance/docker-compose.yml, then your volumes will start with "finance").

About

Save your sanity by backing up your financial data - automatically! *Most batteries included.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages