Installer issues & backup to other local network machine errors out


(Dave Land) #1

Got Nethserver 6.6 set up yesterday after a few caveats with the network interfaces. I think the installer needs to be setup to configure both green and red (or more) zones before finishing, as extra interfaces cannot be configured from the web interface without some command line work. As a result, ONLY the LAN (green) is active, and any attempt to configure another ethernet card in the web interface from another machine on the LAN, defaults to the green zone. Red, Orange, and Blue zones are not available in the config. Nothing can be downloaded as the WAN (red) interface is not functional. Also it may be a plan to update the installer to permit a choice of standalone server or server/gateway type setup without having to go in and do it manually later.

Enough of that… there is a problem with the remote data backup using a CIFS host on the LAN. I created a shared (read/write) directory on the backup machine, and entered the IP address, directory, username, and password in the backup configuration on the NethServer web interface, but it seems the backup errors out before it gets started. Error message goes like this:
===== Report for data backup =====

Backup started at 2015-05-04 12:30:03
Pre backup scripts status: ERROR

Extract from log file /var/log/backup-data.log:

2015-05-04 12:30:03 - START - Backup data started
2015-05-04 12:31:17 - ERROR - Event pre-backup-data failed - 1

Any ideas on how to resolve this would be appreciated. (Incidentally, I backed up to the same machine with SME-Server 8.1 with the same configuration, and it worked fine) Thanks!

Dave Land
Land Computer Service


(Filippo Carletti) #2

In the pre-backup phase, the system dumps the db, it still has to try accessing the cifs share.
More details about the pre-backup error could be found in /var/log/messages.

P.S. I agree with you that the system should let you configure the wan during or immediately after installation without the need of additional steps.


(Dave Land) #3

I think I may have found the problem. It seems the root MySQL password is not right. I ran into this yesterday when I tried to manually update the root P/W from within phpmyadmin. I will try to change this from the command line via ‘mysqladmin’ later on. Here’s the partial output from /var/log/messages:

May 4 12:30:04 gateway esmith::event[18232]: Action: /etc/e-smith/events/pre-backup-data/S10mount-cifs SUCCESS [0.163925]
May 4 12:30:04 gateway esmith::event[18232]: Action: /etc/e-smith/events/pre-backup-data/S10mount-nfs SUCCESS [0.112241]
May 4 12:30:04 gateway esmith::event[18232]: Action: /etc/e-smith/events/pre-backup-data/S10mount-usb SUCCESS [0.121195]
May 4 12:30:04 gateway esmith::event[18232]: ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: YES)
May 4 12:30:04 gateway esmith::event[18232]: Action: /etc/e-smith/events/pre-backup-data/S50mysql-dump-tables FAILED: 1 [0.296991]

Thanks Filippo for the speedy reply and a good way to track this down!

Dave Land
Land Computer Service


(Filippo Carletti) #4

You can find the mysql password in /root/.my.cnf. Set mysql pass to the string you find in .my.cnf.


(Dave Land) #5

Ahh, great! Thank you. :wink:

Dave Land


(Dave Land) #6

OK, finally got that mess straightened out and got my website config files re-adjusted for the proper password… ughh!

Thanks again Filippo!

Dave Land

Edit: Oops, spoke too soon. I successfully changed the P/W back to the one in the /root/.my.cnf file, but it’s still not able to backup because of wrong pass for root user in mysql. Any more ideas??


(Giacomo Sanchietti) #7

If you haven’t any data inside MySQL, just wipe the installation:

service mysqld stop
yum remove nethserver-mysql mysql-server
rm -rf /var/lib/mysql
rm -f /root/.my.cnf
rm -f /etc/my.pwd
yum install nethserver-mysql

Maybe I miss something :slight_smile:


(Dave Land) #8

OK, I’ll give that a try, I have a couple databases in there, but I still have access to phpmyadmin with the string I copied out of /root/.my.cnf, so I should be able to back them up. Thanks for the info!

Dave Land


(Dave Land) #9

On the re-install, nethserver-mysql will automatically re-install the mysql-server, but due to dependencies, nethserver-phpmyadmin, nethserver-roundcubemail, and nethserver-samba-audit are also removed and need to be re-installed…

yum install nethserver-mysql nethserver-phpmyadmin nethserver-roundcubemail nethserver-samba-audit

After this everything now works and it generated a new password in /root/.my.cnf, which I copied over to my website configs, so they could find their databases. Also data backup now works also:

===== Report for data backup =====

Backup started at 2015-05-05 17:35:03
Pre backup scripts status: SUCCESS
Post backup scripts status: SUCCESS
Backup status: SUCCESS
Backup ended at 2015-05-05 17:40:25
Time elapsed: 0 hours, 5 minutes, 22 seconds



Extract from log file /var/log/backup-data.log:

2015-05-05 17:35:03 - START - Backup data started
2015-05-05 17:36:15 - STEP - pre-backup-done done
2015-05-05 17:40:22 - STEP - backup-data-duplicity done
2015-05-05 17:40:25 - SUCCESS - Backup done




Extract from log file /var/log/last-backup.log:

Import of duplicity.backends.dpbxbackend Failed: No module named dropbox
Reading globbing filelist /tmp/0DAF0MSijv
Local and Remote metadata are synchronized, no sync needed.
Last full backup date: none
--------------[ Backup Statistics ]--------------
StartTime 1430868977.28 (Tue May  5 17:36:17 2015)
EndTime 1430869212.11 (Tue May  5 17:40:12 2015)
ElapsedTime 234.83 (3 minutes 54.83 seconds)
SourceFiles 39818
SourceFileSize 1379117869 (1.28 GB)
NewFiles 39818
NewFileSize 1379117869 (1.28 GB)
DeletedFiles 0
ChangedFiles 0
ChangedFileSize 0 (0 bytes)
ChangedDeltaSize 0 (0 bytes)
DeltaEntries 39818
RawDeltaSize 1368058648 (1.27 GB)
TotalDestinationSizeChange 1135746217 (1.06 GB)
Errors 0
-------------------------------------------------

Thanks again for the info!

Dave Land Land Computer Service


(Filippo Carletti) #10

This is bad security practice. The best practice is to create a user (with its password) for every web site with limited access to its database.
Using only one password, if one of the site is compromised, the attacker will access all sites.


(Dave Land) #11

Yikes! You’re right. Hadn’t even thought of that. This is what lack of sleep will do to a person. :stuck_out_tongue: Thank you Filippo!


(Alessio Fattorini) #12

Ahaha please introduce yourself here:


(Dave Land) #13

Thanks Alessio, got it! :slight_smile: