Automated Flynn cluster backups using Amazon S3.
- Installation
- Environment variables reference
- S3 configuration
- Reporting an issue or a feature request
There are various ways you can install Flynn backup:
To install using Flynn dashboard open the url below and follow the instructions on page
https://dashboard.foobar.flynnhub.com/github?owner=eymengunay&repo=flynn-backup
-
If you are using a custom domain to access your cluster, replace
foobar.flynnhub.com
with that domain! -
If you are using an auto-generated flynnhub subdomain, replace
foobar
with id assigned to your cluster!
For Vagrant clusters: https://dashboard.demo.localflynn.com/github?owner=eymengunay&repo=flynn-backup
To install using Flynn cli
# Clone git repository
git clone [email protected]:eymengunay/flynn-backup.git
cd flynn-backup
# Create flynn application
flynn create backup
# Set environment variables
flynn env set CLUSTER_DOMAIN=XXXX
flynn env set CONTROLLER_AUTH_KEY=XXXX
flynn env set S3_ACCESS_KEY=XXXX
flynn env set S3_SECRET_KEY=XXXX
flynn env set S3_BUCKET=XXXX
# Deploy application
git push flynn master
If you may want to keep flynn backup outside of your cluster you can use Heroku:
Flynn Backup requires node.js/npm. Make sure that you have installed and configured node.js.
# Install dependencies via npm
cd /path/to/flynn-backup
npm install
# Set required environment variables
export CLUSTER_DOMAIN=XXXX
export CONTROLLER_AUTH_KEY=XXXX
export S3_ACCESS_KEY=XXXX
export S3_SECRET_KEY=XXXX
export S3_BUCKET=XXXX
# Run application
npm start
You can also put environment variables inside .env file. See https://www.npmjs.com/package/dotenv
Not tested on Windows
Flynn backup stores configuration in environment variables.
Key |
---|
CLUSTER_DOMAIN |
CONTROLLER_AUTH_KEY |
S3_ACCESS_KEY |
S3_SECRET_KEY |
S3_BUCKET |
Learn more:
Make sure that versioning is enabled on your bucket.
Key | Value |
---|---|
FIRST_OF_WEEK | TRUE or FALSE |
DAY_OF_WEEK | 1-7 |
FIRST_OF_MONTH | 1-31 |
DAY_OF_MONTH | TRUE or FALSE |
To automatically rotate backup files create a new lifecycle rule on your bucket:
Add filter to limit scope to prefix/tags:
prefix flynn
None.
Current versions: checked Previous versions: checked
Expire current version of object after 30 days from object creation Permanently delete previous versions after 1 days from becoming a previous version
Clean up incomplete multipart uploads: checked
Issues and feature requests related to this project are tracked in the Github issue tracker: https://github.com/eymengunay/flynn-backup/issues