DataBackup Fails

This is a question aimed at the SQL gurus in the Nethserver community:
I’m getting alerts telling me of data backup failures. The alerts tell me:

Backup: backup-data
Backup started at 2019-02-21 00:15:02
Event pre-backup-data: FAIL
Backup status: FAIL

so it looks like its not getting as far as backup, its a problem with pre-backup-data

so I looked in /var/log/messages and I see this:

Feb 17 15:30:09 bastion esmith::event[7818]: Action: /etc/e-smith/events/pre-backup-data/S20nethserver-backup-config-predatabackup SUCCESS [6.842668]
Feb 17 15:30:27 bastion esmith::event[7818]: Requested path not found
Feb 17 15:30:27 bastion esmith::event[7818]: Action: /etc/e-smith/events/pre-backup-data/S20nethserver-restore-data-duc-index SUCCESS [18.072748]
Feb 17 15:30:27 bastion esmith::event[7818]: ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: YES)
Feb 17 15:30:27 bastion esmith::event[7818]: Action: /etc/e-smith/events/pre-backup-data/S50mysql-dump-tables FAILED: 1 [0.295991]

So it fails when root tries to login, so my guess is that there is something wrong with root@localhost’s access to SQL.

If this was a vanilla installation, I’d have some options to reset passwords, etc, according to Google, but this is a bit of a mixed install…I’m running Nethserver for many
functions, but the same platform is running phpBB3, using the MariaDB (SQL) that came with Nethserver, so I’m being careful 'cos I know nothing about SQL!

Has anyone any suggestions? I’d like to understand what I have to do so that I don’t blow up the phpBB3 unwittingly, and I emphasize the “understand” bit in case this happens again and I can fix it myself



I assume this is the issue

I have set up a mysql user with a password (because I want to keep good security round phpBB3), so going in as root with no password is going to fail, but I don’t know how to change the backup script (what script??) so that the backup process uses the correct username/password…all the solutions I have come across rely upon restoring the username/password back to default…sorry, I was concentrating so much on getting what I had recorded down clearly, I didn’t state the question too clearly

Root has a password. A very lengthy password, in fact, 76 characters long IIRC. It’s stored in /root/.my.cnf, as well as under /var/lib/nethserver/secrets, and that’s what the system expects to use for these activities. If you’ve changed it, you’ve broken your backup (as well as probably other things).


Hi @Jimbo
You have changed you root password and backup can’t work.
I suggest you to reset your root password and create an admin account to manage your database (e.g. with phpmyadmin).

Follow this procedure:

grep password .my.cnf

Copy this password and then launch this commands:

service mysqld stop
mysqld_safe --skip-grant-tables &
set password for 'root'@'localhost' = PASSWORD('yourcopiedpwd');

And then:

service mysqld stop
service mysqld start

If from service interface mysql remains stopped launch this other commands:

mysqladmin shutdown
systemctl start mysqld

Then I suggest you to create an admin account with all privileges with this mysql command:
GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost' IDENTIFIED BY 'adminpassword';
You can use it for application like phpmyadmin.

Then you can check if backup works properly with command
backup-data -b backup-data

Wait for your feedback.


Hi Federico,
Thanks for a very useful response! From what I now know, root will have to keep its own (system generated) password, which is not meant to be accessed or changed by the sysop or anyone else…have I got that right? If it is right, I wonder if I might do better running phpBB3 in a virtual host, rather than in the same operating environment as Nethserver. I could then manage my security however I want to, while retaining a default security structure that won’t break Nethserver functions. Also, I’ve seen (but not yet explored) “virtual hosts” on the Nethserver navigation pane: is that a possible way forward, and if so, is there any documentation you would recommend.

I also thought of running Nethserver as a client on a VMware Host, something that has the advantage of allowing the use of Linux and Windows on the same tin: any comments you have for or against that would be appreciated - I’m reasonably experienced with VMware, so the learning curve would not be too sharp.

Finally, thanks for your time and patience in responding to my questions. I like what I have seen of Nethserver so far, its slicker than the hand-crafted Linux server that I put together and that has been supporting my company for more years than I care to mention, and looks well worth the effort of learning it properly

Best Regards


Install phpBB3 not as Virtual Host and use admin user to enter. Remember to follow the procedure to make backup working again.

VMware is ok and works stable, I still use it a lot but you may have a look at proxmox (integrated backup, full functionality including vcenter like features). More information can be found here.



I fully second @mrmarkuz where Proxmox VS VMWare is concerned…
I still have a couple of VMWare running at Clients, but only because the Old Netware 6.5 won’t run / install under Proxmox. There was support for VMWare and Xen virtualization, but developpment stopped at that. So for historical reasons I still have VMWare running (stable as ever). But newer stuff is done on Proxmox.
My 2 cents

I don’t know that virtual hosts really make a difference here–the key point is that phpBB (or any other application using a database) should have its own database user, rather than using the root, admin, or any other system-wide user (if for some reason phpBB requires use of the root user, (1) that’s very broken behavior and should have you seriously considering using different software, and (2) just use the root password that your system has already generated). This will be the case whether the software is installed in a virtual host or not.

1 Like

All valid points, Danb35, and all of them causing me to reconsider some security decisions that I made a long time ago with much less experience. This episode is prompting a complete “drains-up” and hopefully will result in me having a much better understanding of what is running, and a better-running system. If nothing else, the rate and quality of replies I’m getting on the forum show that the choice of Nethserver was correct and that I’m in the company of some very knowledgeable guys


@Jimbo What about your backup status?

At present, I have no backup from the Nethserver, so I’m going to go back to the old server, which is still sufficiently up-to-date that it won’t impact business, then I can then work safely on the Nethserver, while keeping services online. I will try the steps you proposed, over the weekend, but if I strike too many issues, I will simply go back to a bare metal rebuild and then treat the SQL users with the respect they deserve! The functionality of Nethserver is so good, it makes a bit of pain in the learning process worthwhile

So this weekend, I took some time and rebuilt the server with a separate SQL account administrator for the phpBB3 function, and everything is working perfectly. Thanks to all who commented: without your help and advice this would have been much harder, though now looking back at my original mistake/question, I’m embarrassed by my ignorance. I learnt a lot this weekend!

Now I will spend some more time to get my head around ProxMox, it looks good (good enough that I didn’t default to VMware for the rebuild).



Don’t worry. Everyone here are learning every day, not only you :slight_smile:

Please mark this topic as solved

1 Like

Done as suggested…once again, thanks to all…hope I can return the help soon

1 Like