datamaker backup
Project description
Installation
.env
.env 파일에 아래 환경변수를 적절히 활용
ENABLE_RESTORE
true
|false
dbrestore
, mediarestore
사용 가능 여부. 주로 production 환경에서는 비활성화.
Default: false
ENABLE_BACKUP
true
|false
dbbackup
, mediabackup
사용 가능 여부. 주로 development 환경에서는 비활성화.
Default: false
RESTORE_DATA_ONLY
true
|false
dbrestore
시 schema는 그대로 두고 data만 복원할지 여부.
아직까지는 해당 옵션을 활성화 할 경우 복원할 db에 data가 모두 삭제된 상태로 두어야 함.
Default: false
RESTORE_OPTIONS
comma separated list of pg_restore option names
Example:
clean,create
Default:
RESTORE_DATA_ONLY
가true
일 때에는data-only,disable-triggers,exit-on-error
RESTORE_DATA_ONLY
가false
일 때에는clean,create,exit-on-error
settings.py
settings.py에 아래 내용 추가
from datamaker_backup import get_backup_settings
...
INSTALLED_APPS = (
...
'dbbackup', # django-dbbackup
)
...
# datamaker-backup
# https://github.com/datamaker-kr/datamaker-backup
BACKUP_CONFIG = get_backup_settings('<repository-name>', env)
vars().update(BACKUP_CONFIG)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
datamaker-backup-0.1.1.tar.gz
(4.6 kB
view hashes)
Built Distribution
Close
Hashes for datamaker_backup-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d6766b34ea73a2f4625c507207cddd31d2d11157ace2c9ba735026128329dae |
|
MD5 | 7dc87d14522d0e5502aff96175f1d5f4 |
|
BLAKE2b-256 | 50548832bf71996ea00b56f09a3dee0ffd49ddd8be6e73f7a192970530b40a55 |