Recreate kopano database
-
@fbartels sorry i dont use differential.
-
@ckruijntjens said in Recreate kopano database:
i get all kind of old mail in my restore that i allredeay deleted. (i use the option --deletes yes)
yes, that is exactly what this option does, it also restores deleted items.
-
i understand. but is there no option to restore the mailbox as it was on the last backup? because if i leave out the --deletes yes. i am missing a lot of mails in my mailbox?
-
@ckruijntjens said in Recreate kopano database:
is there no option to restore the mailbox as it was on the last backup
that is what it does when you run
kopano-backup --restore user
-
Hi fbartels when i do that i miss a lot of mail? Any idea why?
I am making my backup every night with the following cronjob.
0 3 * * * /usr/sbin/kopano-backup --l DEBUG --worker-processes 1 --output-dir /opt/mailbackup > /home/backup.log
-
@ckruijntjens said in Recreate kopano database:
when i do that i miss a lot of mail? Any idea why?
the logical explanation would be that the mails you are missing have been deleted and therefore are only restored when you pass
--deletes yes
. -
Hi fbartels. Is there some sort of policy that mails in backups are auto deleted? If i restore my mailbox i really mis a lot of emails that where in my mailbox for a long time. Even yust before my sql crash?
-
Yust find out something realy bad happend with the backups. i do this:
0 3 * * * /usr/sbin/kopano-backup --l DEBUG --worker-processes 1 --output-dir /opt/mailbackup > /home/backup.log
This seems not to backuped everything. still missing things.
I also do this:
mysqldump -p --single-transaction --routines kopano > /opt/mailbackup/fullbackupdatabase.sql
After restoring database tables are missing. Am i using the wright commands to backup?
-
@ckruijntjens
when the sql file is restored i can not start kopano-server because its missing kopano.version table inside mariadb database. Can i fix this somehow?
-
I restored the mysql dump however now i have this error when starting
nection to database ‘kopano’ succeeded 2020-01-16T06:48:57.193848: [error ] Can’t update the database: 2020-01-16T06:48:57.193980: [notice ] Waiting for mysql_server_end 2020-01-16T06:48:57.193989: [notice ] Waiting for mysql_library_end 2020-01-16T06:48:57.193993: [=======] Server shutdown complete.
I allredeay did kopano-dbadm k-1216
Any ideas?
-
@ckruijntjens said in Recreate kopano database:
After restoring database tables are missing. Am i using the wright commands to backup?
Yes, that command should normally backup all your database tables
@ckruijntjens said in Recreate kopano database:
when the sql file is restored i can not start kopano-server because its missing kopano.version table inside mariadb database. Can i fix this somehow?
Afair kopano-server should recreate missing tables on its own
@ckruijntjens said in Recreate kopano database:
Can’t update the database
That could be related to the versions table missing.
Something seems to be seriously wrong with your server, when even a mysqldump is not producing complete backups. For me this looks like you need help way beyond what a forum can provide, so if you do not have a subscription yet this may be the moment to get one and then get in contact with out support: https://kopano.com/support-info/#mauticform_wrapper_contactkopanosupport
I have to add though, even they cannot perform micracles.
-
Hi fbartels thank you for your reply. I will start again. I will restore what can be restored. Is there some way to monitor the backup and see if the backup is ok in the future?
I never saw any errors or something. Not with kopano-backup and not with mysqldump
-
the thing is, you should have gotten an error when mysql decided to skip the table at backup/restore.
-
hi felix,
i restored my lxc machine to the last export of 2 months ago. The strange thing is that in the last backup changes are progressed that i made (some of them) could it be that kopano-backup and mysqldump scripts crossed each other causing an inconsistend backup?
-
no, I would not think so. both operations should only read data and that should really not cause inconsistencies, Overall it sounds like you either have a faulty disk or maybe faulty ram?