Enhancement #2773

Backup data: web interface for restore

Added by Giacomo Sanchietti about 7 years ago. Updated about 6 years ago.

Status:CLOSEDStart date:
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:nethserver-restore-data
Target version:v6.6
Resolution: NEEDINFO:Yes

Description

Add a simple web interface to restore data from backup.

The user should be able to:
  • choose between one of available backups
  • restore only from latest backup
  • select a directory or search for it using a string
  • restore one or more directory in the original destination or a into a new directory

Associated revisions

Revision e5d7b85e
Added by Giacomo Sanchietti about 7 years ago

post-backup: generate backup file list. Refs #2749 #2773

Revision 3cc972a4
Added by Giacomo Sanchietti about 7 years ago

nethserver-backup-data.exclude: exclude backup list from backup. Refs #2773

Revision a1735524
Added by Giacomo Sanchietti about 7 years ago

createlinks, actions: remove modifications for #2773 from master branch. Refs #2773

Revision 4319f65d
Added by Edoardo Spadoni about 6 years ago

spec file. added nethserver-backup-data dependency. Refs #2773

Revision 03eae1fe
Added by Edoardo Spadoni about 6 years ago

language. added language translation for restore message. Refs #2773

Revision cc670dfb
Added by Filippo Carletti about 6 years ago

nethserver-backup-data.exclude: remove non-existing restore dir. Refs #2773

Revision c2edf13e
Added by Edoardo Spadoni about 6 years ago

ui. removed unused backup paths from interface. Refs #2773

Revision f612cf6f
Added by Davide Principi about 6 years ago

Merge pull request #1 from edospadoni/master

upgrade to jquery 1.9.1 and jquery ui 1.8.23. Refs #2773

Revision 39cbb43f
Added by Davide Principi about 6 years ago

Use jQuery 1.9.1, jQuery-UI 1.8.23. Refs #2773

Fixed nethgui sha1sum and path.

Revision ade4c072
Added by Edoardo Spadoni about 6 years ago

ui. removed duplicate entries on graphic tree. Refs #2773

Revision ce8cbbb9
Added by Edoardo Spadoni about 6 years ago

ui. removed unused fullpath attribute on json tree. Refs #2773

Revision 3c801150
Added by Edoardo Spadoni about 6 years ago

ui. refactor code for nethgui guidelines. Refs #2773

Revision 23db791a
Added by Edoardo Spadoni about 6 years ago

ui. graphic restyling. Refs #2773

Revision 6a75c266
Added by Edoardo Spadoni about 6 years ago

core. improved dump and visualization of xml tree. Refs #2773

Revision 8ed756c6
Added by Edoardo Spadoni about 6 years ago

ui. search enabled with at least 3 chars inserted. Refs #2773

Revision 47ad5794
Added by Giacomo Sanchietti about 6 years ago

spec: add duc dependency. Refs #2773

History

#1 Updated by Giacomo Sanchietti about 7 years ago

  • Status changed from NEW to TRIAGED
  • Target version set to v6.5
  • % Done changed from 0 to 20

#2 Updated by Giacomo Sanchietti about 7 years ago

  • Status changed from TRIAGED to ON_DEV
  • % Done changed from 20 to 30

#3 Updated by Giacomo Sanchietti almost 7 years ago

  • Status changed from ON_DEV to TRIAGED
  • % Done changed from 30 to 20

#4 Updated by Giacomo Sanchietti almost 7 years ago

  • Target version changed from v6.5 to ~FUTURE

#5 Updated by Giacomo Sanchietti about 6 years ago

  • Description updated (diff)
  • Target version changed from ~FUTURE to v6.6

#6 Updated by Giacomo Sanchietti about 6 years ago

  • Status changed from TRIAGED to ON_DEV
  • Assignee set to Edoardo Spadoni
  • % Done changed from 20 to 30

#7 Updated by Giacomo Sanchietti about 6 years ago

  • Category changed from nethserver-backup-data to nethserver-restore-data

#8 Updated by Davide Principi about 6 years ago

In nethserver-testing:
nethserver-httpd-admin-1.4.1-1.4.g39cbb43.ns6.noarch.rpm

#9 Updated by Edoardo Spadoni about 6 years ago

  • Status changed from ON_DEV to MODIFIED
  • Assignee deleted (Edoardo Spadoni)
  • % Done changed from 30 to 60

The package nethserver-httpd-admin-1.4.1-1.4.g39cbb43.ns6.noarch.rpm has been updated to upgrade jQuery and jQuery-UI to 1.9.1 and 1.8.23 respectively because the web interface for restore (this issue) requires and high version of jQuery. The package has been tested on a clean machine with all nethserver* packages installed. All views seem to work properly and also the Dashboard tabs work well.

Test case for nethserver-httpd-admin package.
Install the package and check if all views of the admin page work well.

Test cases for web interface for restore
Prerequisites
  • Install the package
  • Configure a backup (on view BackupData of admin dashboard)
  • Launch script to start a backup (simply run backup-data)

Notes
In the graphic tree, there may be directories not included in the backup.

Test Case 1
  • Check on view RestoreData if graphic tree of directories is created and it is navigable
Test Case 2
  • Try to type something in the search input and check if the tree showed the matched strings
Test Case 3
  • Select Restore data in the original path and check if the backup data are properly restored (overwritten)
Test Case 4
  • Select Restore data in new directory and check if the backup data are properly restore in new directory.
Test Case 5
  • Select multiple nodes in the tree (by holding Ctrl key) and choose Restore data in the original path or Restore data in new directory and check if all nodes are properly restored

#10 Updated by Giacomo Sanchietti about 6 years ago

  • Status changed from MODIFIED to ON_QA
  • % Done changed from 60 to 70
Package in nethserver-testing:
  • nethserver-restore-data-0.0.1-1.8.g601756d.ns6.noarch.rpm
  • nethserver-httpd-admin-1.4.1-1.4.g39cbb43.ns6.noarch.rpm

#11 Updated by Vasco Castelo Branco about 6 years ago

  • Assignee set to Vasco Castelo Branco

#12 Updated by Vasco Castelo Branco about 6 years ago

  • Status changed from ON_QA to VERIFIED
  • Assignee deleted (Vasco Castelo Branco)
  • % Done changed from 70 to 90

#13 Updated by Edoardo Spadoni about 6 years ago

  • Status changed from VERIFIED to ON_QA
  • % Done changed from 90 to 70

#14 Updated by Edoardo Spadoni about 6 years ago

  • Status changed from ON_QA to TRIAGED
  • % Done changed from 70 to 20

#15 Updated by Edoardo Spadoni about 6 years ago

  • Status changed from TRIAGED to MODIFIED
  • % Done changed from 20 to 60

If the module is installed and there is not a indexed db to get the tree structure, the ui doesn't show the tree. Also the file list on directory (ajax call to get the list) is too much expensive in terms of usability.

#16 Updated by Giacomo Sanchietti about 6 years ago

  • Status changed from MODIFIED to ON_QA
  • % Done changed from 60 to 70
Package in nethserver-testing:
  • nethserver-restore-data-0.0.1-1.10.g8ed756c.ns6.noarch.rpm

#17 Updated by dz0 0te about 6 years ago

i have read the test case, that start from a no backup config status.
in the old version (nethserver-restore-data-0.0.1-1.8.g601756d) i've also noticed that if i already have one or more backup, after installing the nethserver-restore-data package accessing to restore tab give me an error in the UI:

[["Tf0a2af2d",[]],["T689a3796",null],["T3ace11bc",null],["T2e032b5c",{"text":"\/","children":[]}],["__COMMANDS__",{"0":{"R":"RestoreData","M":"setMandatoryFields","A":[{"RestoreData_path":true,"RestoreData_position":false}]}}],["__STATE__","644c2cc8d92dd02f37db4de45f9628fc"]]

[2] Invalid argument supplied for foreach()

See the system log for details.

log:

Jun 19 09:17:53 ns6fresh httpd-admin: [2] Invalid argument supplied for foreach() - File /usr/share/nethesis/NethServer/Module/RestoreData.php, line 116

after a backup-data from shell (or probably after the next scheduled backup) i can access to the restore tab.
I do not know if it is the correct behavior, so, in doubt I wanted to report it

#18 Updated by Edoardo Spadoni about 6 years ago

We just updated the rpm package that include the fix for your error. The correct version should be 0.0.1-1.10.g8ed756c.ns6. Try to wait the sync of repositories, then update the package and do again the test cases.

#19 Updated by dz0 0te about 6 years ago

With
nethserver-httpd-admin-1.4.1-1.7.g45a2f72.ns6.noarch
nethserver-restore-data-0.0.1-1.10.g8ed756c.ns6.noarch
i have no more problem to access to Restore page (even in presence of old backup) but 'im
Stuck at test case 2, the directory content of selected node is not showed.
Tested with and without existent backup.

#20 Updated by Edoardo Spadoni about 6 years ago

You can ignore the second test case (I just remove it) because we removed that part. Thanks

#21 Updated by dz0 0te about 6 years ago

  • Assignee set to dz0 0te

#22 Updated by dz0 0te about 6 years ago

  • Assignee deleted (dz0 0te)
  • NEEDINFO changed from No to Yes

System and Package Version installed
VM KVM - Clean installation of Nethserver 6.6 fully update
Package Installed: nethserver-httpd-admin-1.4.0-1.ns6.noarch
Other Package installed: Backup, File server,Web server

Test Original Problem
Enhancement

Install Updated Package

yum --enablerepo=nethserver-testing install nethserver-httpd-admin-1.4.1-1.4.g39cbb43.ns6 nethserver-restore-data-0.0.1-1.10.g8ed756c.ns6

Test Results after update
Test Case 1
OK. Tree of dir, created and navigable
Test Case 3
OK. Search start with at least 3 chars, works correctly
Test Case 4
OK. Data restored. All folder overwritten
Test Case 5
OK. Data restored in new folder NameFolder_date
Test Case
OK. Restoring multple nodes in original or new dirs works.

Note
All test made from shell works restoring correct data.
only one Problem: if from shell i delete an ibay folder (with guest access in r/w enabled) i could not re-enter in the ibay after restoring it. I must reset permission frome the UI to gain access from guest (the data is restored correctly)
No problem if i delete the content of the ibay and then restore it.
No problem with the ibay when i login as user (menmber of the group who own the share)
I'm not sure if this is a bug (like it seems) or a normal behavior...

#23 Updated by Vasco Castelo Branco about 6 years ago

This feacture is verified or need to be retested?

#24 Updated by dz0 0te about 6 years ago

hi Vasco, as i say in the Note, i have one minor problem with permission when the ibay is in read/write mode for guest. Data is there but i must reset permission to gain access. I don't know if thi is a bug or a normal behavior so i've marked NEEDINFO=YES, and i'm waiting infor from the devs. I've planned to retest in the week-end but if you want and you have some time maybe could you test to see if you have the same problem otherwise we can expect some info from the devs. tnx

#25 Updated by Vasco Castelo Branco about 6 years ago

I asked only to know if you forget to change the enhancement status.

As I see the tests requested by the devs are ok.
Its better to set as verified in order to continue the work

In the notes you can inform the problem you found and they will decide if is necessary to open a bug or not

#26 Updated by Giacomo Sanchietti about 6 years ago

only one Problem: if from shell i delete an ibay folder (with guest access in r/w enabled) i could not re-enter in the ibay after restoring it. I must reset permission frome the UI to gain access from guest (the data is restored correctly)

There is no way to workaround this problem, but we should definitively document this behavior.
All major tests are passed, I think this is a go.

Surely we should improve this application in the near future but we need to collect more usage scenarios.

Thanks to both testers!

#27 Updated by Giacomo Sanchietti about 6 years ago

  • Status changed from ON_QA to VERIFIED
  • % Done changed from 70 to 90

#28 Updated by Giacomo Sanchietti about 6 years ago

  • Status changed from VERIFIED to CLOSED
  • % Done changed from 90 to 100
Released in nethserver-updates:
  • nethserver-backup-data-1.1.4-1.ns6.noarch.rpm
  • nethserver-restore-data-1.0.0-1.ns6.noarch.rpm

Backup documentation updated.

Also available in: Atom PDF