Backup Config Module - Beta - Final stage

Woah! thanks @Ctek and @davidep it’s SUPER COOL and works like a charm.

Just a few hints

  • Is it possibile do add a little span before the table? it looks a bit stuck to the row above

  • a confirmation popup after the restore action should prevent a possble disruptive restore.

  • show a popup after the restore which confirms the process ending

BTW

2 Likes

Hi,

Can I take advantage of this topic to make a suggestion:
Make a entry in the first setup wizard to restore a backup !

I think it could be an easy way to proceed a recovery after a serious server fault.

2 Likes

I like to improve the setup wizard and your enhancement might be very useful but we need an upload function

2 Likes

Or a Restore Config Module :wink:

1 Like

@davidep, Thank you Davide, I did not know how I could add the scripts into the sudoers and did not think to use the scripts to create the symlink.
Thanks again for your help!

Hi @alefattorini, those pop-up exists.
When you click a restore link you are asked if you realy want to do a restore.
And after the restore is done a message should confirm this.

Are you having a different behaviour then this?

@Jim, To have the restore from backup at install time it’s a great feature and it is discussed.
I’ll try to add the rest of the feature to be able to upload a backup from external source into the UI

1 Like

You’re right, a yellow popup is shown after the restore action but I can’t see the latter. No “done message” at all

Hm, this could be that the response from the restore script is not catched by the exec() command.
I’ll have to look into this and come back with feedback.

1 Like

Can we move forward on this? @Ctek which help do you need? For me, it’s a nice feature but we should complete and release it.
:slight_smile:

1 Like

Hi Guys,
I’ve uploaded the new code on Git.Here
You can see here the details of the latest changes.

There are a couple of known issues (like uploading the backup file ) but I’m working on a solution with @davidep maybe also @filippo_carletti and @giacomo can throw in their thought on this ?

The move_uploaded_file() in PHP does not have the rights to move the file in the backup/ folder.
Discussing with @davidep the solution found is to create a move script that will snatch the temp file and put it in the backup folder.
This will also be useful to trigger the script to generate the md5 sum for the new uploaded file.

The upload section can be seen in the screenshots in the top left corner of the Backup page

Here are some preview screenshots:
Normal page:

Confirmation on deleting a backup file:

Confirmation on Restoring a backup:

Progress bar when restoring a backup:
(This is only a timer to allow the backup to finish)

Some UI information added:
(The MD5 of backup files are checked and on error a info is displayed)

Please let me know your thoughts on this.
BR

Bogdan

8 Likes

Is md5 mandatory? Does tar run integrity checks by itself? Can we avoid displaying md5 on UI?

Calculating md5 can be time expensive… Do we really need it?

Well the integrity of the backup archive is important.
Having a corrupted archive could render the restore process unusable or worse it can make the whole server unstable/unusable.

We can avoid having the md5 displayed but then you will have to check it manually to see exactly what is the checksum.
Also when transferring a file to the server can be corrupted in the process and you will not have any info on the md5 sum to compare it with the one you have on your station.

In my opinion it does not hurt to see the actual md5 checksum.

I can time timestamp start/stop the process to render the whole page but from the current runs for the 17 - 18 files that are on the page the delay is not noticeable less than a second.

Update: BackupConfig Module Beta.

I’ve updated the Git with the new changes to the BackupConfig.

Added a script that gets the uploaded backup file and copies the file into the backup folder.
Modified the info div to keep the actions performed (more like a log file)

I did not find any bugs with this version and it works ok.
Please test it and let me know if you encounter anything.

If there are no reports regarding this functionality the current code will become Final Ver 1.0.

BR
Bogdan

6 Likes

It looks great! I am going to test it out in the coming days

2 Likes

Hello,

Can I install “Backup Config Module” on Nethserver 7 Alpha 2?

I haven’t test it on NS7 Alpha, but you are more than welcome to try it.
Maybe @alefattorini or @davidep can make a package available for NS7

Any news (for NS 6.7 because NS 7 is still far away …)?

(When can we install Backup Config Module from NS Software center?)

Hi Gabriel,
Well I did not receive any feedback regarding the usage.

I Myself did not encounter any issues with the current version. So maybe it can be done as a package…

There are some thoughts abut securing the ajax more, but it is a side discussion.

I have thought about some methods to implement, but they are out of the scope of the backup module. You can say that they are valid for the whole ajax libraries.

PS: The module should work on NS 7 also without modifications.

1 Like

Hi Bogdan,

Thank you for your response.

I use NethServer in production as Email Server and I want to install this module as clean as possible, from Software Center to avoid any issues which can occur for any reasons (It’s hard to reinstall from scratch an email server with a lot of domains and a lot of users if something going wrong in case of some updates and so on …).

I have the same worries about Fail2Ban module by @stephdl. I want this module but from Software Center.

Some GOOD NEWS regarding those modules from @alefattorini, @davidep, @giacomo, @filippo_carletti and of course from @stephdl ?

BR,
Gabriel

We should move this discussion in the topic you have linked.

@Ctek sorry for the delay, I’m going to try it soon!

1 Like

I mentioned F2B here because it was related to my expectation for two very good modules.
Sorry about this.
Stephane already gave me the answer.

BR,
Gabriel