Django app to backup Sqlite or Postgres database to an S3 Object Storage.
Project description
Telescoop Backup
Backup your sqlite database to an S3 compatible provider.
Quick start
Configuration
- Add "Telescop Backup" to your INSTALLED_APPS setting like this::
INSTALLED_APPS = [
...
'telescoop_backup',
]
- Include the Telescop Backup URLconf in your project urls.py like this::
path('backup/', include('telescoop_backup.urls')),
- Define the following settings in
settings.py
BACKUP_ACCESS = 'my_access' # S3 ACCESS
BACKUP_SECRET = 'my_secret' # S3 SECRET KEY
BACKUP_BUCKET = 'my_project_backup' # S3 Bucket
BACKUP_KEEP_N_DAYS = 31 # Optional, defaults to 31
BACKUP_REGION = None # Optional, defaults to eu-west-3 (Paris)
BACKUP_HOST = None # Optional, default to s3.{BACKUP_REGIOn}.amazonaws.com
By default, old backups are removed in order not to take up too much space. If you don't want them removed, just set a very large value for BACKUP_KEEP_N_DAYS.
Backup
You can now backup with the backup_db
management command :
python manage.py backup_db backup
to back up current databasepython manage.py backup_db media
to back upsettings.MEDIA_ROOT
python manage.py backup_db list
to list previous backupspython manage.py backup_db recover [file_name]
to recover previous database
View last backup and if it is recent
/backup/last-backup
shows the latest backup/backup/backup-is-less-than-XX-hours-old
answersyes
(status 200) orno
(status 500). This route can be used with a service such as uptimerobot.com.
Gitignore
If you use it in local environment, ignore the backup files
.telescoop_backup_last_backup
*.sqlite
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
telescoop-backup-0.1.6.tar.gz
(9.1 kB
view hashes)
Built Distribution
Close
Hashes for telescoop_backup-0.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5cf067a854a747259d904a9d647e8b8a3ca3955a75f82887adf2ba17296b4e68 |
|
MD5 | fd01b7a534bffe8e736bcfac2fbd91a1 |
|
BLAKE2b-256 | a293b40d51146d7af7767d7f789977746e40983cd80a6c0948c221aaa46ffdc8 |