Skip to content

NaviTools/backup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Backup tool

Automatically generates backups to an S3 Bucket

Supports both PostgreSQL and MariaDB databases.

Setup

Requires the following variables:

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_S3_BUCKET=
AWS_S3_REGION=
BACKUP_DATABASE_URL=
DATABASE_TYPE=postgres  # or 'mariadb'
SERVICE_NAME=
SENTRY_DSN=

Database Connection URLs

For PostgreSQL:

postgresql://username:password@host:port/database

For MariaDB:

mysql://username:password@host:port/database

How to restore

Download the zip file and uncompress it.

You'll have a file that ends in .sql (ex: my-backup.sql)

PostgreSQL Restore

Run the following command on the same directory as the .sql file exists:

psql -U <username> -h <host> -d <DB-Name> -f my-backup.sql

MariaDB Restore

Run the following command on the same directory as the .sql file exists:

mysql -u <username> -p -h <host> <DB-Name> < my-backup.sql

About

Tool for generating database backups

Resources

Stars

Watchers

Forks

Releases

No releases published

Contributors 2

  •  
  •