Enhancement #2699

Backup config: minimize creation of new backup

Added by Giacomo Sanchietti over 7 years ago. Updated almost 7 years ago.

Status:CLOSEDStart date:
Priority:HighDue 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.

The backup includes:
  • 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

Related to NethServer 6 - Feature #2739: Backup config: add web interface CLOSED

Associated revisions

Revision 2bcb13d6
Added by Giacomo Sanchietti over 7 years ago

New implementation of backup-config. Refs #2699

Revision 1bd9ebf5
Added by Giacomo Sanchietti over 7 years ago

createlinks: move restore to post-restore-config event. Refs #2699

Revision 39c09843
Added by Giacomo Sanchietti over 7 years ago

backup-config: remove nethserver-ibays-backup. Refs #2699

Revision ec0dd3c4
Added by Giacomo Sanchietti over 7 years ago

New implementation of backup-config. Refs #2699

Revision 72fd4483
Added by Giacomo Sanchietti over 7 years ago

restore config: execute event host-modify. Refs #2699

Revision 975c5e1f
Added by Giacomo Sanchietti over 7 years ago

Backup: change nethserver-ibays-restore action Refs #2699

Move nethserver-ibays-restore to post-restore-data event.
Restore only ACL.

Revision 4043da43
Added by Giacomo Sanchietti over 7 years ago

backup-config: include custom backup config. Refs #2699

Revision e14da225
Added by Giacomo Sanchietti over 7 years ago

restore-config: add samehardware option. Refs #2699

Revision 5d3aaa8d
Added by Giacomo Sanchietti over 7 years ago

backup-config: remove nethserver-mail-backup. Refs #2699

Revision 0eaa72c7
Added by Giacomo Sanchietti over 7 years ago

backup-config: remove maildir.tar Refs #2699

Revision c432ddcd
Added by Giacomo Sanchietti over 7 years ago

backup-config: remove restore action. Refs #2699

Revision 1c75d9c6
Added by Giacomo Sanchietti over 7 years ago

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
New implementation features:
  • 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
Packages in nethserver-testing:
  • 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
Test case 1
  • Install all updated packages on a clean machine
  • Execute: backup-config
  • Check the file /var/lib/nethserver/backup/backup-config.tar.xz exists
Test case 2
  • 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
Test case 3
  • Execute test case 1
  • Execute again: backup-config
  • Check the file /var/lib/nethserver/backup/backup-config.tar.xz is not updated
Test case 4
  • 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
Test case 5
  • 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
Release in nethserver-updates:
  • 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

Also available in: Atom PDF