mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
backups: Implement backup/restore of key/value settings
- Implemented within the backup component. Scope for implementing database backup/restore in similar way. - Add new 'settings' key in the backup manifest to allow keys to backed up and restored. - Implement by dumping/loading settings from DB into the file. Tests: - Unit tests. - Backup/restore tests for dynamicdns workss. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
a9c6e96a95
commit
59c5e58549
8 files changed
+188
-6
No files matched your search
@@ -113,10 +113,12 @@ class WordPressBackupRestore(BackupRestore):
|
||||
|
||||
def backup_pre(self, packet):
|
||||
"""Save database contents."""
|
||||
super().backup_pre(packet)
|
||||
actions.superuser_run('wordpress', ['dump-database'])
|
||||
|
||||
def restore_post(self, packet):
|
||||
"""Restore database contents."""
|
||||
super().restore_post(packet)
|
||||
actions.superuser_run('wordpress', ['restore-database'])
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user