[Solved] Data backup failures

NethServer Version: 7.6.1810
**Module:**Backup

I’m having problems with the data backup. Initially I set it to use an NFS share on a small secondary server. Using the web interface, I entered the hostname of the server, then the share path. Everything looked ok…

When it runs, /var/log/backup.log give me very little:

    Backup: backup-data
    Backup started at 2019-04-17 01:00:01
    Event pre-backup-data: FAIL
    Backup status: FAIL

Looking through /var/log/messages gets me more detail:

    Apr 17 01:00:02 barracuda esmith::event[11359]: Event: pre-backup-data backup-data
    Apr 17 01:00:02 barracuda esmith::event[11359]: ===== Report for configuration backup =====
    Apr 17 01:00:02 barracuda esmith::event[11359]: Backup started at 2019-04-17 01:00:02
    Apr 17 01:00:03 barracuda esmith::event[11362]: Event: pre-backup-config
    Apr 17 01:00:03 barracuda esmith::event[11362]: expanding /etc/backup-config.d/nethserver-sssd.include
    Apr 17 01:00:03 barracuda esmith::event[11362]: Action: /etc/e-smith/events/actions/generic_template_expand SUCCESS [0.146185]
    Apr 17 01:00:03 barracuda esmith::event[11362]: Action: /etc/e-smith/events/pre-backup-config/S20nethserver-directory-dump-ldap SUCCESS [0.041049]
    Apr 17 01:00:03 barracuda esmith::event[11362]: Action: /etc/e-smith/events/pre-backup-config/S40nethserver-mail-shrmbx-cfgbackup SUCCESS [0.009793]
    Apr 17 01:00:03 barracuda esmith::event[11362]: Action: /etc/e-smith/events/pre-backup-config/S40nethserver-sssd-backup-tdb SUCCESS [0.003403]
    Apr 17 01:00:04 barracuda esmith::event[11362]: Action: /etc/e-smith/events/pre-backup-config/S50nethserver-backup-config-list-packages SUCCESS [1.556611]
    Apr 17 01:00:04 barracuda esmith::event[11362]: Event: pre-backup-config SUCCESS
    Apr 17 01:00:04 barracuda esmith::event[11359]: Event pre-backup-config: SUCCESS
    Apr 17 01:00:05 barracuda esmith::event[11359]: Action backup-config-execute: SUCCESS
    Apr 17 01:00:05 barracuda esmith::event[11488]: Event: post-backup-config
    Apr 17 01:00:05 barracuda esmith::event[11488]: Event: post-backup-config SUCCESS
    Apr 17 01:00:05 barracuda esmith::event[11359]: Event post-backup-config: SUCCESS
    Apr 17 01:00:05 barracuda esmith::event[11359]: Backup status: SUCCESS
    Apr 17 01:00:05 barracuda esmith::event[11359]: Backup ended at 2019-04-17 01:00:05
    Apr 17 01:00:05 barracuda esmith::event[11359]: Time elapsed: 0 hours, 0 minutes, 3 seconds
    Apr 17 01:00:05 barracuda esmith::event[11359]: Action: /etc/e-smith/events/pre-backup-data/S20nethserver-backup-config-predatabackup SUCCESS [2.53874]
    Apr 17 01:00:08 barracuda esmith::event[11359]: Requested path not found
    Apr 17 01:00:08 barracuda esmith::event[11359]: Action: /etc/e-smith/events/pre-backup-data/S20nethserver-restore-data-duc-index SUCCESS [2.830641]
    Apr 17 01:00:08 barracuda esmith::event[11359]: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
    Apr 17 01:00:08 barracuda esmith::event[11359]: Action: /etc/e-smith/events/pre-backup-data/S50mysql-dump-tables FAILED: 1 [0.324735]
    Apr 17 01:00:08 barracuda su: (to postgres) root on none
    Apr 17 01:00:09 barracuda esmith::event[11359]: Action: /etc/e-smith/events/pre-backup-data/S50nethserver-webtop5-backup SUCCESS [0.77923]
    Apr 17 01:00:09 barracuda esmith::event[11359]: Event: pre-backup-data FAILED

I’m at a loss to explain the “requested path not found” and I also have no idea why it is getting an access denied for user root message. Thinking it might be having problems mounting the NFS share, I plugged in a USB drive (ext4 formatted) and tried that instead. Failed again, with pretty well identical error messages.

Have I missed a step in the configuration? So far as I can see, I’ve set things up through the server-manager as they should be set. I can easily mount the NFS share from the command line, as I can the USB drive. The only thing I can see that I’ve not set up is a mount point on the local server, but I assume that should be done automatically by the backup routine?

Yes the mount point is automatic.

The log clearly states the error:

Apr 17 01:00:08 barracuda esmith::event[11359]: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Apr 17 01:00:08 barracuda esmith::event[11359]: Action: /etc/e-smith/events/pre-backup-data/S50mysql-dump-tables FAILED: 

The mysqld root password has probably been changed.
You can verify it by executing mysql command which should give you direct access to the db.
If you did manual modification, you could try to fix it executing:

expand-template /root/.my.cnf

I saw the password error, but wasn’t sure, since the system seems to be doing the configuration backups successfully. Not to mention that I’ve not touched the mysql password. When I migrated the old system from SME, I carefully copied the Nethserver /root/.my.cnf to the migration directory to avoid password errors when the data was migrated.

Attempting to log into mysql from the command line fails, so something has certainly changed the password. Question now is how I return it to the original as stored in /root/.my.cnf

I found some directions for changing the mysql password here:

Unfortunately, they don’t work - if I attempt to use systemctl to stop mysql I get nothing at all.

Are there more up-to-date instructions on how to change the mysql password?

Have a look at:

2 Likes

Thanks. That allowed me to set it back to the way it was listed in /root/.my.cnf.

I’m still puzzled as to how the password came to be changed. I certainly didn’t purposely change it. When I migrated the original SME server, I tried to make the migration use the Nethserver mysql password to avoid any failures when loading the mysql dumps in /var/lib/migration.

With the password corrected, the data backup completed successfully.

1 Like