Backups have failed since DB ad DB user added

NethServer Version: NethServer release 7.7.1908 (final)
Kernel Release: 3.10.0-1062.18.1.el7.x86_64
CPU model 12 x Intel® Xeon® CPU W3680 @ 3.33GHz
I thought I would try to help my street during the CoronaVirus and put up a phpBB3 forum for everyone to keep in touch. I already run an instance of phpBB3, and that’s running fine.

I got a new Domain name and put up a Virtual host. That worked fine. Then I created a new DB and a new user in Maria to support the bulletin board.

I was going to install phpBB3.3 (latest) but it was unhappy with my version of PHP, it wanted 7.1.3, so at that point I stopped, didn’t want to do a manual upgrade and break the server.

Everything is still working but backups. I now get an error report when backup tries to run. The backups go to a USB disk, and it’s still connected (yes, I checked!). I had a look in messages, and have extracted the information pasted below. Can any of you suggest a way to diagnose and fix this, I’m struggling!

(I have restarted the system, it boots OK, but no improvement on the backup situation)

Thanks
Jim
Mar 25 08:32:15 bastion systemd: Started Session c218 of user root.

Mar 25 08:32:15 bastion /sbin/e-smith/db[14769]: /var/lib/nethserver/db/backups: OLD backup-data=duplicity|BackupTime|48 7 * * *|CleanupOlderThan|14D|FullDay|0|Notify|always|NotifyFrom|< sender name obscured>| NotifyTo||Program|duplicity|SMBHost|192.168.200.2|SMBLogin|root|SMBPassword||SMBShare|g:|Type|full|USBLabel|MyVolume1|VFSType|usb|status|enabled

Mar 25 08:32:15 bastion /sbin/e-smith/db[14769]: /var/lib/nethserver/db/backups: NEW backup-data=duplicity|BackupTime|32 8 * * *|CleanupOlderThan|14D|FullDay|0|Notify|always|NotifyFrom||NotifyTo||Program|duplicity|SMBHost|192.168.200.2|SMBLogin|root|SMBPassword||SMBShare|g:|Type|full|USBLabel|MyVolume1|VFSType|usb|status|enabled

Mar 25 08:32:15 bastion systemd: Started Session c219 of user root.

Mar 25 08:32:15 bastion esmith::event[14773]: Event: nethserver-backup-data-save

Mar 25 08:32:15 bastion esmith::event[14773]: expanding /etc/backup-data.d/nethserver-backup-data.include

Mar 25 08:32:15 bastion esmith::event[14773]: expanding /etc/cron.d/backup-data

Mar 25 08:32:15 bastion esmith::event[14773]: expanding /etc/davfs2/davfs2.conf

Mar 25 08:32:15 bastion esmith::event[14773]: expanding /etc/davfs2/secrets

Mar 25 08:32:15 bastion esmith::event[14773]: expanding /etc/ssh/ssh_config

Mar 25 08:32:15 bastion esmith::event[14773]: Action: /etc/e-smith/events/actions/generic_template_expand SUCCESS [0.177045]

Mar 25 08:32:16 bastion esmith::event[14773]: Action: /etc/e-smith/events/nethserver-backup-data-save/S30nethserver-restore-data-clean-list SUCCESS [0.108431]

Mar 25 08:32:16 bastion esmith::event[14773]: Action: /etc/e-smith/events/nethserver-backup-data-save/S40nethserver-backup-data-ssh SUCCESS [0.003279]

Mar 25 08:32:16 bastion esmith::event[14773]: Event: nethserver-backup-data-save SUCCESS

Mar 25 08:32:33 bastion /sbin/e-smith/db[14858]: /var/lib/nethserver/db/backups: OLD backup-data=duplicity|BackupTime|32 8 * * *|CleanupOlderThan|14D|FullDay|0|Notify|always|NotifyFrom||NotifyTo||Program|duplicity|SMBHost|192.168.200.2|SMBLogin|root|SMBPassword||SMBShare|g:|Type|full|USBLabel|MyVolume1|VFSType|usb|status|enabled

Mar 25 08:32:33 bastion /sbin/e-smith/db[14858]: /var/lib/nethserver/db/backups: NEW backup-data=duplicity|BackupTime|33 8 * * *|CleanupOlderThan|14D|FullDay|0|Notify|always|NotifyFrom||NotifyTo||Program|duplicity|SMBHost|192.168.200.2|SMBLogin|root|SMBPassword||SMBShare|g:|Type|full|USBLabel|MyVolume1|VFSType|usb|status|enabled

Mar 25 08:32:33 bastion systemd: Started Session c221 of user root.

Mar 25 08:32:33 bastion esmith::event[14862]: Event: nethserver-backup-data-save

Mar 25 08:32:33 bastion esmith::event[14862]: expanding /etc/backup-data.d/nethserver-backup-data.include

Mar 25 08:32:33 bastion esmith::event[14862]: expanding /etc/cron.d/backup-data

Mar 25 08:32:33 bastion esmith::event[14862]: expanding /etc/davfs2/davfs2.conf

Mar 25 08:32:33 bastion esmith::event[14862]: expanding /etc/davfs2/secrets

Mar 25 08:32:33 bastion esmith::event[14862]: expanding /etc/ssh/ssh_config

Mar 25 08:32:33 bastion esmith::event[14862]: Action: /etc/e-smith/events/actions/generic_template_expand SUCCESS [0.174042]

Mar 25 08:32:34 bastion esmith::event[14862]: Action: /etc/e-smith/events/nethserver-backup-data-save/S30nethserver-restore-data-clean-list SUCCESS [0.136909]

Mar 25 08:32:34 bastion esmith::event[14862]: Action: /etc/e-smith/events/nethserver-backup-data-save/S40nethserver-backup-data-ssh SUCCESS [0.002424]

Mar 25 08:32:34 bastion esmith::event[14862]: Event: nethserver-backup-data-save SUCCESS

Mar 25 08:33:03 bastion esmith::event[15004]: Event: pre-backup-data backup-data

Mar 25 08:33:03 bastion esmith::event[15004]: ===== Report for configuration backup =====

Mar 25 08:33:03 bastion esmith::event[15004]: Backup started at 2020-03-25 08:33:03

Mar 25 08:33:03 bastion esmith::event[15007]: Event: pre-backup-config

Mar 25 08:33:03 bastion esmith::event[15007]: expanding /etc/backup-config.d/nethserver-sssd.include

Mar 25 08:33:03 bastion esmith::event[15007]: Action: /etc/e-smith/events/actions/generic_template_expand SUCCESS [0.144381]

Mar 25 08:33:04 bastion esmith::event[15007]: Action: /etc/e-smith/events/pre-backup-config/S40nethserver-dc-pre-backup SUCCESS [1.51249]

Mar 25 08:33:05 bastion esmith::event[15007]: Action: /etc/e-smith/events/pre-backup-config/S40nethserver-mail-shrmbx-cfgbackup SUCCESS [0.00904400000000005]

Mar 25 08:33:05 bastion esmith::event[15007]: Action: /etc/e-smith/events/pre-backup-config/S40nethserver-sssd-backup-tdb SUCCESS [0.005743]

Mar 25 08:33:06 bastion esmith::event[15007]: Action: /etc/e-smith/events/pre-backup-config/S50nethserver-backup-config-list-packages SUCCESS [1.451442]

Mar 25 08:33:06 bastion esmith::event[15007]: Event: pre-backup-config SUCCESS

Mar 25 08:33:06 bastion esmith::event[15004]: Event pre-backup-config: SUCCESS

Mar 25 08:33:10 bastion esmith::event[15004]: Action backup-config-execute: SUCCESS

Mar 25 08:33:11 bastion esmith::event[15214]: Event: post-backup-config

Mar 25 08:33:11 bastion esmith::event[15214]: Action: /etc/e-smith/events/post-backup-config/S40nethserver-dc-post-backup SUCCESS [0.029949]

Mar 25 08:33:11 bastion esmith::event[15214]: Event: post-backup-config SUCCESS

Mar 25 08:33:11 bastion esmith::event[15004]: Event post-backup-config: SUCCESS

Mar 25 08:33:11 bastion esmith::event[15004]: Backup status: SUCCESS

Mar 25 08:33:11 bastion esmith::event[15004]: Backup ended at 2020-03-25 08:33:11

Mar 25 08:33:11 bastion esmith::event[15004]: Time elapsed: 0 hours, 0 minutes, 8 seconds

Mar 25 08:33:11 bastion esmith::event[15004]: Action: /etc/e-smith/events/pre-backup-data/S20nethserver-backup-config-predatabackup SUCCESS [7.884522]

Mar 25 08:33:11 bastion esmith::event[15004]: ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: YES)

Mar 25 08:33:11 bastion esmith::event[15004]: Action: /etc/e-smith/events/pre-backup-data/S50mysql-dump-tables FAILED: 1 [0.077097]

Mar 25 08:33:11 bastion su: (to ejabberd) root on none

Mar 25 08:33:11 bastion esmith::event[15004]: sed: can’t read /opt/ejabberd-20.01/conf/ejabberd.yml: No such file or directory

Mar 25 08:33:11 bastion esmith::event[15004]: sed: can’t read /opt/ejabberd-20.01/conf/ejabberd.yml: No such file or directory

Mar 25 08:33:11 bastion esmith::event[15004]: sed: can’t read /opt/ejabberd-20.01/conf/ejabberd.yml: No such file or directory

Mar 25 08:33:11 bastion esmith::event[15004]: sed: can’t read /opt/ejabberd-20.01/conf/ejabberd.yml: No such file or directory

Mar 25 08:33:11 bastion su: (to ejabberd) root on none

Mar 25 08:33:11 bastion esmith::event[15004]: 2020-03-25 08:33:11.625916

Mar 25 08:33:11 bastion esmith::event[15004]: args: ["/opt/ejabberd-20.01/conf/inetrc"]

Mar 25 08:33:11 bastion esmith::event[15004]: format: “inet_config: file ~ts not found~n”

Mar 25 08:33:11 bastion esmith::event[15004]: label: {error_logger,error_msg}

Mar 25 08:33:11 bastion esmith::event[15004]: =ERROR REPORT==== 25-Mar-2020::08:33:11.625916 ===

Mar 25 08:33:11 bastion esmith::event[15004]: inet_config: file /opt/ejabberd-20.01/conf/inetrc not found

Mar 25 08:33:11 bastion esmith::event[15004]:

Mar 25 08:33:11 bastion esmith::event[15004]: Action: /etc/e-smith/events/pre-backup-data/S50nethserver-ejabberd-backup SUCCESS [0.740435]

Mar 25 08:33:11 bastion esmith::event[15004]: Action: /etc/e-smith/events/pre-backup-data/S50nethserver-ibays-dump-acls SUCCESS [0.003813]

Mar 25 08:33:11 bastion esmith::event[15004]: Event: pre-backup-data FAILED

did you change root password of mariadb?

1 Like

Not intentionally, though its possible, I was following some old instructions I wrote myself a while back, and I’m no DBA!. Is it possible to check/change from the CLI?
Thanks
Jim

could you verify the instructions and find if them contain the new root password?

It looks like that may be what I’ve done, so I have a good idea of what it has changed to: but I’m not sure how to rectify my error, and I don’t want to go in and make matters worse, can you suggest my next action?

You may write the new root password you set to /var/lib/nethserver/secrets/mysql. Make a backup of the file to save the old password.

Run following command to apply the new password to ~\.my.cnf.

signal-event nethserver-mysql-update

https://docs.nethserver.org/projects/nethserver-devel/en/latest/nethserver-mysql.html#nethserver-mysql

Then test as root if you can connect to mysql

mysql

You should be logged in to mysql without being asked for a password.

1 Like

I had a look at /var/lib/nethserver/secrets/mysql, the contents are a string that looks like it may be a machine-generated random string (though it could be encrypted, I don’t know). If it is a machine generated random string, could I just chage the root DB password back to that with the mysqladmin command or would that not work?

Thanks

Jim

Yes, that should work:

@mrmarkuz

Any news about a Guacamole upgrade to 1.1?
(Still interested about the Swiss-german keyboard issue…) :slight_smile:

My 2 cents
Andy

I followed Marcus’ instructions and backups are working properly again. Many thanks to all, its superb responses like this that make Nethserver the right choice…I couldn’t have had better support if I had a support contract on the box!
Thanks
Jim

1 Like