Backup Config Module - Beta - Final stage

Looks promising, please @davidep let me know when I can test a safe version.

1 Like

It appears that the rpm is not fixed. I’m doing some testing and am not seeing backups listed in the UI. :frowning:

Hi @Adam , this is most probably because the symlink to the backup folder is not created.
you will need to do:

ln -s /var/lib/nethserver/backup /usr/share/nethesis/nethserver-manager/backup

Let me know if it works after this.
BR

1 Like

You can use the createlinks file if you want to make a symlinks during the installation.

2 Likes

Thanks @Ctek, that made the backups show up. I can download backups, but when I try to delete them, I get the following:

Also, are you planning on implementing a graceful method of uploading backups?

Hi @Adam,
You will need to add the script /sbin/e-smith/delete-config to the sudoers, Like in the image

Otherwise the script is not allowed to delete the files.

Yes I’ve also was thinking on adding a upload field to be able to put your backups from outside NS.
Probably the next feature is to add that upload field. :smile:

BR

1 Like

Thanks for the help! It looks almost done!

So how do we get the symlink and the addition of the script into the rpm so those changes don’t have to be done manually? @davidep :smiley:

I’m on it, @Adam :wink:

Edit: in nethforge-testing/6.7
nethserver-backup-config-1.4.2-1.12.gbc43eeb.ns6.noarch.rpm

@Ctek, you can cherry-pick my commit here: https://github.com/DavidePrincipi/nethserver-backup-config/commit/bc43eeb2fede96fa25309e739f107dae7fc8f612

3 Likes

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