2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-19 21:45:39 +00:00

Remove dbbackup integration

- Data dumping and restoring is now very complex!
- We should use the invoke export-records function now, rather than relying on dbbackup / dbrestore
- Documentation will be updated to match
This commit is contained in:
Oliver Walters
2021-04-25 12:14:36 +10:00
parent 2f2354afdc
commit b08cd8da20
8 changed files with 1 additions and 54 deletions

View File

@ -18,8 +18,6 @@ def canAppAccessDatabase():
'makemirations',
'migrate',
'check',
'dbbackup',
'mediabackup',
'dbrestore',
'mediarestore',
'shell',

View File

@ -250,7 +250,6 @@ INSTALLED_APPS = [
# Third part add-ons
'django_filters', # Extended filter functionality
'dbbackup', # Database backup / restore
'rest_framework', # DRF (Django Rest Framework)
'rest_framework.authtoken', # Token authentication for API
'corsheaders', # Cross-origin Resource Sharing for DRF
@ -586,17 +585,6 @@ CRISPY_TEMPLATE_PACK = 'bootstrap3'
# Use database transactions when importing / exporting data
IMPORT_EXPORT_USE_TRANSACTIONS = True
BACKUP_DIR = get_setting(
'INVENTREE_BACKUP_DIR',
CONFIG.get('backup_dir', tempfile.gettempdir()),
)
# Settings for dbbsettings app
DBBACKUP_STORAGE = 'django.core.files.storage.FileSystemStorage'
DBBACKUP_STORAGE_OPTIONS = {
'location': BACKUP_DIR,
}
# Internal IP addresses allowed to see the debug toolbar
INTERNAL_IPS = [
'127.0.0.1',

View File

@ -138,12 +138,6 @@ static_root: '/home/inventree/static'
# - git
# - ssh
# Backup options
# Set the backup_dir parameter to store backup files in a specific location
# If unspecified, the local user's temp directory will be used
# Use environment variable INVENTREE_BACKUP_DIR
backup_dir: '/home/inventree/data/backup/'
# Permit custom authentication backends
#authentication_backends:
# - 'django.contrib.auth.backends.ModelBackend'
@ -159,4 +153,4 @@ backup_dir: '/home/inventree/data/backup/'
# - 'django.contrib.auth.middleware.AuthenticationMiddleware'
# - 'django.contrib.messages.middleware.MessageMiddleware'
# - 'django.middleware.clickjacking.XFrameOptionsMiddleware'
# - 'InvenTree.middleware.AuthRequiredMiddleware'
# - 'InvenTree.middleware.AuthRequiredMiddleware'