Skip to content
This repository has been archived by the owner on Feb 16, 2021. It is now read-only.
/ trello-snapshot Public archive

A simple bash script to fetch a Trello board as JSON and store it automatically with Git as snapshots.

License

Notifications You must be signed in to change notification settings

octoquad/trello-snapshot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Trello Snapshot

A simple bash script to fetch a Trello board as JSON and store it automatically with Git as snapshots.

Requirements

  • bash
  • wget
  • git
  • jq

Setup

Install dependencies

Hey, you never know...

Using su:

# apt-get install wget git-core jq

Using sudo

sudo apt-get install wget git-core jq

Git user name and e-mail address

You can skip this step if you have already hacked on and contributed to other projects that use git. If not, welcome :)

git config --global user.name "Your name here"

and

git config --global user.email "[email protected]"

Configuration

Inside trello-snapshot.sh there are five settings that need to be set, with only two really being required.

Required

Set the Git repository location without a trailing slash

GIT_REPO='/home/username/trello-backup'

Trello URL to download Trello Board JSON. If you are not sure where to find this read this.

TRELLO_URL='https://trello.com/b/unique-id.json'

Optional

The default commit message to use

GIT_COMMIT_MESSAGE='Updated Trello Board'

An example would be:

[master 8b1ffb7] Updated Trello Board
 1 file changed, 1 insertion(+), 1 deletion(-)

Local file name for storing Trello Board JSON file and to use in git

FILE_NAME='trello-board.json'

Prettify JSON before storing in git. This is useful if you want to see changes made using git diff HEAD^..HEAD

JQ_PRETTIFY="true" # or false

That's it. Time to backup your Trello board.

Run manually

./trello-snapshot.sh

Run at a specified time as a cron job

You can optionally run this script at a defined time, some examples are

@daily  /path/to/trello-snapshot.sh
@hourly /path/to/trello-snapshot.sh 2>&1 /dev/null # No output

# Every day at 4:30 am
30 4 * * * /path/to/trello-snapshot.sh

# Monthly at 4:30 am
30 4 1 * * /path/to/trello-snapshot.sh

Bugs and feature requests

Please file any bugs and feature requests here. Pull requests are always welcome.


Made for the South African Ubuntu team (and you of course).

About

A simple bash script to fetch a Trello board as JSON and store it automatically with Git as snapshots.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages