Enhancement #2699
Backup config: minimize creation of new backup
Status: | CLOSED | Start date: | ||
---|---|---|---|---|
Priority: | High | Due date: | ||
Assignee: | - | % Done: | 100% | |
Category: | nethserver-backup-config | |||
Target version: | v6.5 | |||
Resolution: | NEEDINFO: | No |
Description
The configuration backup should be a very small file which changes only on rare circumstances.
Actual implementation will recreate the file each time backup-config
command is launched.
- ldap dump (nethserver-directory)
- maildir structure (nethserver-mail-server)
- tdb dump (nethserver-samba)
- acl dump (nethserver-ibays)
- shared folder directory structure (nethserver-ibays)
Related issues
Associated revisions
New implementation of backup-config. Refs #2699
createlinks: move restore to post-restore-config event. Refs #2699
backup-config: remove nethserver-ibays-backup. Refs #2699
New implementation of backup-config. Refs #2699
restore config: execute event host-modify. Refs #2699
Backup: change nethserver-ibays-restore action Refs #2699
Move nethserver-ibays-restore to post-restore-data event.
Restore only ACL.
backup-config: include custom backup config. Refs #2699
restore-config: add samehardware option. Refs #2699
backup-config: remove nethserver-mail-backup. Refs #2699
backup-config: remove maildir.tar Refs #2699
backup-config: remove restore action. Refs #2699
backup-config: add secrets_tdb.dump. Refs #2699
History
#1 Updated by Giacomo Sanchietti over 7 years ago
- Status changed from NEW to TRIAGED
- Priority changed from Normal to High
- % Done changed from 0 to 20
#2 Updated by Filippo Carletti over 7 years ago
- Subject changed from Back config: minimize creation of new backup to Backup config: minimize creation of new backup
#3 Updated by Davide Principi over 7 years ago
- Target version set to ~FUTURE
#4 Updated by Giacomo Sanchietti over 7 years ago
- Target version changed from ~FUTURE to v6.5
#5 Updated by Giacomo Sanchietti over 7 years ago
- Status changed from TRIAGED to ON_DEV
- Assignee set to Giacomo Sanchietti
- % Done changed from 20 to 30
#6 Updated by Giacomo Sanchietti over 7 years ago
- Description updated (diff)
#7 Updated by Giacomo Sanchietti over 7 years ago
- Status changed from ON_DEV to MODIFIED
- % Done changed from 30 to 60
- Create backup only if files are changed
- Use XZ compression
- Do not backup maildir structure
- Do not backup ibay structure
- Move acl dump and restore to backup-data
- New option
--same-hardware
The algorithm works as follow:
If destination file (backup-config.tar.xz
) doesn't exists, just create it excluding all files belonging to a RPM and listed in .exclude files.
After file creation, calculate MD5 sum of all archived files (backup-config.tar.xz-content.md5
)and the archive itself (backup-config.tar.xz.md5
).
If destination file already exists, check if any file is changed using MD5 signatures. If at least one file is modified, create a new backup
All files are saved inside /var/lib/nethserver/backup
directory.
The restore-config
command has a new option --same-hardware
. If the option is specified, network configuration will be not wiped out at the end of restore. This option is useful when restoring a configuration database on the same hardware.
#8 Updated by Giacomo Sanchietti over 7 years ago
- Status changed from MODIFIED to ON_QA
- Assignee deleted (
Giacomo Sanchietti) - % Done changed from 60 to 70
- nethserver-backup-config-1.0.5-4.0git79e237c6.ns6.noarch.rpm
- nethserver-ibays-2.0.3-4.0git43377e55.ns6.noarch.rpm
- nethserver-mail-server-1.6.4-11.0gitc432ddcd.ns6.noarch.rpm
- nethserver-samba-1.4.2-4.0git1c75d9c6.ns6.noarch.rpm
- nethserver-backup-data-1.0.9-2.0git51c46262.ns6.noarch.rpm
- Install all updated packages on a clean machine
- Execute: backup-config
- Check the file
/var/lib/nethserver/backup/backup-config.tar.xz
exists
- Execute test case 1
- Modify/create a record in the configuration database
- Execute: backup-config
- Check the file
/var/lib/nethserver/backup/backup-config.tar.xz
is updated
- Execute test case 1
- Execute again: backup-config
- Check the file
/var/lib/nethserver/backup/backup-config.tar.xz
is not updated
- Execute: backup-config
- Modify/create a record in the configuration database
- Restore the backup on the same machine using the --same-hardware
- Check the modification to configuration database is gone
- Check network configuration is consistent
- Execute: backup-config
- Restore the backup on a new machine
- Check network configuration is deleted
- Re-configure the network and check all services are working (mail, shared folder)
#9 Updated by Massimo Palazzetti about 7 years ago
- Assignee set to Massimo Palazzetti
#10 Updated by Massimo Palazzetti about 7 years ago
- Status changed from ON_QA to VERIFIED
- Assignee deleted (
Massimo Palazzetti) - % Done changed from 70 to 90
All the 5 test-case was succesfully tested
#11 Updated by Giacomo Sanchietti about 7 years ago
- Status changed from VERIFIED to CLOSED
- % Done changed from 90 to 100
- nethserver-backup-config-1.1.0-1.ns6.noarch.rpm
#12 Updated by Davide Principi almost 7 years ago
In nethserver-updates:
nethserver-ibays-2.1.0-1.ns6.noarch.rpm