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_HOST = None # Optional, default to s3.fr-par.scw.cloud (Scaleway Storage in Paris)
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 backupto back up current databasepython manage.py backup_db mediato back upsettings.MEDIA_ROOTpython manage.py backup_db listto list previous backupspython manage.py backup_db recover [file_name]to recover previous database
View last backup and if it is recent
/backup/last-backupshows the latest backup/backup/backup-is-less-than-XX-hours-oldanswersyes(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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file telescoop_backup-0.2.4.tar.gz.
File metadata
- Download URL: telescoop_backup-0.2.4.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3b60c1b6358841e52520bc46d14b7842a8fb30e31f339392f67f75576bcd994
|
|
| MD5 |
8e0eb4722a8b6c3c89e9ea4ce1d322c0
|
|
| BLAKE2b-256 |
79d38205a485b7fb84eb823f8c22ac660b65dc977ffbb074f6ac19772e5de83c
|
File details
Details for the file telescoop_backup-0.2.4-py3-none-any.whl.
File metadata
- Download URL: telescoop_backup-0.2.4-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f99d7ae9d606ce0f7e02e502981437dab28602a186f03d6cb106906b39996db6
|
|
| MD5 |
81582d0131674e92a3ff74726fc26268
|
|
| BLAKE2b-256 |
29698b977e565e68c715618ef0aedcd12dc8586109bdfa309aa499a1ba074fc7
|