Event pre-backup-data failed

nethserver6.8 final - backup-target=NAS

(hiding password - but in original there is password of NAS-admin)

testing share on NAS - it’s possible to create files under /mnt/backup (mountpoint of \NAS\Public\BAK.MAIL
as root of nethserver.
But on dashboard “FAILED” and if I look in backup-data.log I found everytime this:

2016-08-22 12:00:04 - START - Backup data started
2016-08-22 12:00:47 - ERROR - Event pre-backup-data failed - 1

Is there another log-file, where I can find more informations ? What’s wrong ?

Thank you!

Did you receive the backup email notification? Check it out, it might report some additional info
Also /var/log/backup-data.log

Good evening,
Yes, we got email-report
This is the complete mail

===== Report for data backup =====
Backup started at 2016-08-22 14:00:02
Pre backup scripts status: ERROR

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

2016-08-22 14:00:02 - START - Backup data started
2016-08-22 14:00:06 - ERROR - Event pre-backup-data failed - 1

It’s not enough for me to find the cause …

I removed nethserver-backup and installed new > same backup- ERROR

I create a NFS-share on NAS > could see and write but > same backup-
ERROR

Greetings

Good morning,

I’m reading the /var/log/backup-data.log

2016-08-22 14:00:02 - START - Backup data
started

2016-08-22 14:00:06 - ERROR - Event pre-backup-data failed - 1

I understand this so:

“There is an error during preparation of the backup”

So I checked the permission on NAS > OK, it’s possible to make mkdir and
touch a file and delete a file

than Isearch for the nethserver-backup-internas

I found in /var/lib/nethserver/backup/mysql 6 dump-files with backup-time
> looks OK!

(faxdb.dump mysql. owncloud. roundcubemail. smbaudit. sogo.)

In /var/lib/nethserver/backup Ifound with the same date/time:

  • ldap-config.ldif

  • ldap-data.ldif

  • package-list

  • secrets_tdp.dump

  • sogo-backup.tgz

It looks OK for me - but I’m not shure, because I don’t know the background
of nethserver-backup, Only see duplicity-files

BUT THERE IS SOMETHING I FORGOT TO SAY:

since 11.11.2015 configured the backup to write on a share of a
windows-machine - this was OK !

But now there is a NAS to use for backups - and now there is trouble.

PERHAPS THATSWHY I HAVE TO GO A SPECIAL WAY TO CHANGE BACKUP- TARGET ??

Greetings,

All events are logged in /var/log/messages, search for pre-backup-data in it.

Good evening,

that’s the good source ! Found there:

Action: /etc/e-smith/events/pre-backup-data/S20nethserver-restore-data-duc-index SUCCESS [2.597281]
mysqldump: Error 1194: Table ‘sogo_cache_folder_user1’ is marked as crashed and should be repaired when dumping
Action: /etc/e-smith/events/pre-backup-data/S50mysql-dump-tables FAILED: 1 [0.230792]

That’s the reason … Last week there were 2 energy-breakdowns, because of street-building
But how to repair ‘sogo_cache_folder_user1’ ??

2 Likes

found it at mother google:

mysql -u root
mysql> use sogo
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> REPAIR TABLE sogo_cache_folder_user1;
±-----------------------------±-------±---------±------------------------------------------------+
| Table | Op | Msg_type | Msg_text |
±-----------------------------±-------±---------±------------------------------------------------+
| sogo.sogo_cache_folder_user1 | repair | info | Found block with too small length at 0; Skipped |
| sogo.sogo_cache_folder_user1 | repair | warning | Number of rows changed from 99 to 98 |
| sogo.sogo_cache_folder_user1 | repair | status | OK |
±-----------------------------±-------±---------±------------------------------------------------+
3 rows in set (0.36 sec)

mysql> exit
Bye

but after :

backup-data

there are new errors in /var/log/last-backup.log:

Duplicity 0.6 series is being deprecated:
See http://www.nongnu.org/duplicity/

Reading globbing filelist /tmp/uQfFggSQYJ
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Local and Remote metadata are synchronized, no sync needed.
Last full backup date: Fri Aug 5 13:00:10 2016
Last full backup is too old, forcing full backup
Traceback (most recent call last):
File “/usr/bin/duplicity”, line 1509, in
with_tempdir(main)
File “/usr/bin/duplicity”, line 1503, in with_tempdir
fn()
File “/usr/bin/duplicity”, line 1352, in main
do_backup(action)
File “/usr/bin/duplicity”, line 1473, in do_backup
full_backup(col_stats)
File “/usr/bin/duplicity”, line 538, in full_backup
globals.backend)
File “/usr/bin/duplicity”, line 401, in write_multivol
at_end = gpg.GzipWriteFile(tarblock_iter, tdp.name, globals.volsize)
File “/usr/lib64/python2.6/site-packages/duplicity/gpg.py”, line 388, in GzipWriteFile
new_block = block_iter.next()
File “/usr/lib64/python2.6/site-packages/duplicity/diffdir.py”, line 518, in next
result = self.process(self.input_iter.next())
File “/usr/lib64/python2.6/site-packages/duplicity/diffdir.py”, line 187, in get_delta_iter
sigTarFile = util.make_tarfile(“w”, sig_fileobj)
File “/usr/lib64/python2.6/site-packages/duplicity/util.py”, line 113, in make_tarfile
tf = tarfile.TarFile(“arbitrary”, mode, fp)
File “/usr/lib64/python2.6/site-packages/duplicity/tarfile.py”, line 1527, in init
self.name = os.path.abspath(name)
File “/usr/lib64/python2.6/posixpath.py”, line 346, in abspath
cwd = os.getcwd()
OSError: [Errno 2] No such file or directory


what meaning cwd = os.getcwd() …current path not correct or what ?
I moved older backups from windows-share to the NAS - is this not allowed ?
What should I do, I don’t like to remove the older backups ?

Started again …

backup-data

… and waiting … and waiting … and waiting
looking to backupfolder on NAS … and there are new files! with current date
That’s it

Thanks to all …
This should be a “Howto Trouble-shooting …”

3 Likes

You’re right, database corruption is pretty common. Do you want to write down some notes? So one of our @docs_team can jump in and help.

no, it’s not… and it would not happen if you have an UPS :wink:

1 Like

Sorry, I didn’t mean “pretty common” with this meaning but in case a backup fails during the pre-backup it’s very likely that is due to MySQL problems: corruptions, wrong permissions.
And yes, it might happen often without an UPS

1 Like

I know , but…

Greetings