mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-17 20:45:44 +00:00
Configuration options for dbbackup (#4190)
* Configuration options for dbbackup Ref: https://github.com/inventree/InvenTree/discussions/4179 * DBBACKUP_SEND_EMAIL is always False * Cleanup settings file * Make backup step optional during update * Change update operation to perform backup by default
This commit is contained in:
@ -147,10 +147,21 @@ STATIC_COLOR_THEMES_DIR = STATIC_ROOT.joinpath('css', 'color-themes').resolve()
|
||||
# Web URL endpoint for served media files
|
||||
MEDIA_URL = '/media/'
|
||||
|
||||
# Backup directories
|
||||
DBBACKUP_STORAGE = 'django.core.files.storage.FileSystemStorage'
|
||||
DBBACKUP_STORAGE_OPTIONS = {'location': config.get_backup_dir()}
|
||||
# Database backup options
|
||||
# Ref: https://django-dbbackup.readthedocs.io/en/master/configuration.html
|
||||
DBBACKUP_SEND_EMAIL = False
|
||||
DBBACKUP_STORAGE = get_setting(
|
||||
'INVENTREE_BACKUP_STORAGE',
|
||||
'backup_storage',
|
||||
'django.core.files.storage.FileSystemStorage'
|
||||
)
|
||||
|
||||
# Default backup configuration
|
||||
DBBACKUP_STORAGE_OPTIONS = get_setting('INVENTREE_BACKUP_OPTIONS', 'backup_options', None)
|
||||
if DBBACKUP_STORAGE_OPTIONS is None:
|
||||
DBBACKUP_STORAGE_OPTIONS = {
|
||||
'location': config.get_backup_dir(),
|
||||
}
|
||||
|
||||
# Application definition
|
||||
|
||||
|
@ -142,8 +142,11 @@ cors:
|
||||
# STATIC_ROOT is the local filesystem location for storing static files
|
||||
#static_root: '/home/inventree/data/static'
|
||||
|
||||
# BACKUP_DIR is the local filesystem location for storing backups
|
||||
### Backup configuration options ###
|
||||
# INVENTREE_BACKUP_DIR is the local filesystem location for storing backups
|
||||
backup_storage: django.core.files.storage.FileSystemStorage
|
||||
#backup_dir: '/home/inventree/data/backup'
|
||||
#backup_options:
|
||||
|
||||
# Background worker options
|
||||
background:
|
||||
|
Reference in New Issue
Block a user