This board is the new home for david63's extensions.

All of the extensions hosted here will need to be treated as a new install as there is no migration from the original ones to these, and furthermore, no support will be given to migrating to any of these extensions from previous versions.


Due to the selfishness of certain board members it has become necessary to apply a limit of how many downloads each member can make before making a donation. Once a donation has been made then you will have unlimited downloads.

[3.3.0] Auto db Backup

Fully working extensions
User avatar
devspace
Owner
Owner
Posts: 280
Joined: October 2022

Re: [3.3.0] Auto db Backup

#26

Post by devspace »

stone23 wrote: 24 Jan 2023, 18:55
the automatic backup does not work
Yet again a minimal bit of information.

The auto backup does work - in fact it is used every day on this board.

There are several reasons why it may not appear be working on your board.
  1. The database is too big to be run in this way.
  2. There is a problem with another cron job which is locking the cron queue.
  3. There is one or more other cron jobs in the queue and it just has not run.
  4. There has been no activity on your board at the time the cron job is scheduled to run.

stone23
Donor
Donor
Posts: 75
Joined: January 2023

Re: [3.3.0] Auto db Backup

#27

Post by stone23 »

Having read the topic, I first set the Anonymous user's timezone as my forum's.
My forum has the following date format (based on the French language), so I put the "admin_controller.php" file:

Code: Select all

			'NEXT_BACKUP_TIME' 				=> date('l d F Y G:i', $this->config['auto_db_backup_next_gc'] + $user_offset - $utc_offset),
And finally, I made several attempts by changing the programming hours.

My database is 216.78 MB.

I only had a recording done once and the time did not match the scheduled time and between each try I deactivated the extension, deleted the data and reinstalled the extension.

User avatar
devspace
Owner
Owner
Posts: 280
Joined: October 2022

Re: [3.3.0] Auto db Backup

#28

Post by devspace »

Why are you changing the code? There is a reason why the date has to be in that format otherwise the js code will not run.
stone23 wrote: 25 Jan 2023, 14:34
and the time did not match the scheduled time
That is normal if there was no activity on your board. There has to be some user activity to trigger the cron job.

stone23
Donor
Donor
Posts: 75
Joined: January 2023

Re: [3.3.0] Auto db Backup

#29

Post by stone23 »

devspace wrote: 25 Jan 2023, 15:31
Why are you changing the code? There is a reason why the date has to be in that format otherwise the js code will not run.
I only did this for testing but I was getting the same thing with the original code...
devspace wrote: 25 Jan 2023, 15:31
That is normal if there was no activity on your board. There has to be some user activity to trigger the cron job.
So I think this explanation is the most plausible...

stone23
Donor
Donor
Posts: 75
Joined: January 2023

Re: [3.3.0] Auto db Backup

#30

Post by stone23 »

I will leave this extension activated (I put the original code back) for a few days and I will review the point to be sure of the explanation...

Tino23
New Member
New Member
Posts: 2
Joined: February 2023

Re: [3.3.0] Auto db Backup

#31

Post by Tino23 »

German language file Image
de.zip
You do not have the required permissions to view the files attached to this post.

rwg
Member
Member
Posts: 3
Joined: February 2023

Re: [3.3.0] Auto db Backup

#32

Post by rwg »

Hi,

first, thanks for providing such a useful extension. I have been using it for some time (before it was hosted here), and updated to the latest version a month or so back.

I have had a problem with both the older and the latest version - deleting old backup files was just not working. I had some time today to look into it and by adding various logging throughout the cron task, it seems that for some reason it was having a problem deleting one or more of the files using 'unlink'. This was then causing the cron task to fail to complete successfully, leaving the cron lock in place, etc.

I tried to work out what was going on with the delete failure by adding a try/catch, but annoyingly I saw one catch log message and then after that everything seemed to work on following runs, deleting files as required.

Along the way, I think I also saw cases where the backup was failing to complete the SQL saving stage, a couple of times in the (rather large) search tables - maybe this is some sort of timeout from my hosting provider? Anyway, I also hacked the code to skip the _search_* tables from the backup, since they can be regenerated. Might be a nice option?

My auto_db_backup_last_gc is still stuck in 2020 and doesn't seem to update, but the _next_gc config is fine, so the backup seems to run as required. I think I will not worry about that one!

cheers,

Robin

User avatar
devspace
Owner
Owner
Posts: 280
Joined: October 2022

Re: [3.3.0] Auto db Backup

#33

Post by devspace »

If you have a large database it is possible that php is timing out - try, if you can, increasing the max execution time.

rwg
Member
Member
Posts: 3
Joined: February 2023

Re: [3.3.0] Auto db Backup

#34

Post by rwg »

Yes, that's quite possible - the database isn't enormous (a few hundred megabytes), but as far as I can work out there is probably a 60s timeout from the hosting provider for PHP which I cannot alter.

I am going to try setting gzip rather than bzip to increase the speed of creating the backup, and ignoring the search tables definitely helps.

I wonder how long it has been since I had a successful backup that actually completed rather than being cut off? It's a shame that this error is basically 'silent' ... Unless you notice the lack of 'backup completed' entries in the logs then you might never notice.

Maybe if there was a bit of code at the end of the cron task to write a 'backupOK' file or to set a setting to 'last backup ran OK' then the ACP page could flag up the fact that backups were failing?

cheers,

Robin

User avatar
devspace
Owner
Owner
Posts: 280
Joined: October 2022

Re: [3.3.0] Auto db Backup

#35

Post by devspace »

rwg wrote: 26 Mar 2023, 12:37
Maybe if there was a bit of code at the end of the cron task to write a 'backupOK'
There is - it's in the Admin log

rwg
Member
Member
Posts: 3
Joined: February 2023

Re: [3.3.0] Auto db Backup

#36

Post by rwg »

Hi,

yes, I guess, but I guess that my argument would be that it would be nice to have a 'backup failed' entry in the admin log in this case, rather than just a lack of a 'backup completed OK' entry. The former is much more noticeable.

cheers,

Robin

donsenilo
Member
Member
Posts: 3
Joined: December 2022

Re: [3.3.0] Auto db Backup

#37

Post by donsenilo »

First I get the
Module ACP_AUTO_DB_BACKUP does not exist
-Error and after uploading the de-Translationfile I get
SQL ERROR [ mysqli ]

Duplicate entry 'devspace/autodbbackup' for key 'ext_name' [1062]

SQL

INSERT INTO phpbb_ext (ext_name, ext_active, ext_state) VALUES ('devspace/autodbbackup', 0, 'b:1;')

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 1023
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysqli.php
LINE: 202
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/db/driver/factory.php
LINE: 345
CALL: phpbb\db\driver\mysqli->sql_query()

FILE: [ROOT]/phpbb/extension/manager.php
LINE: 179
CALL: phpbb\db\driver\factory->sql_query()

FILE: [ROOT]/phpbb/extension/manager.php
LINE: 241
CALL: phpbb\extension\manager->update_state()

FILE: [ROOT]/includes/acp/acp_extensions.php
LINE: 209
CALL: phpbb\extension\manager->enable_step()

FILE: [ROOT]/includes/functions_module.php
LINE: 676
CALL: acp_extensions->main()

FILE: [ROOT]/adm/index.php
LINE: 81
CALL: p_master->load_active()
I use phpBB 3.3.10

User avatar
devspace
Owner
Owner
Posts: 280
Joined: October 2022

Re: [3.3.0] Auto db Backup

#38

Post by devspace »

What are the steps that you have done?

donsenilo
Member
Member
Posts: 3
Joined: December 2022

Re: [3.3.0] Auto db Backup

#39

Post by donsenilo »

As you noted
If you are using any other version of this extension then it must be Disabled /Delete data and the original files deleted before installing this version
and then upload and (try to) activate as usual.

david.matthewson
Member
Member
Posts: 3
Joined: June 2023

Re: [3.3.0] Auto db Backup

#40

Post by david.matthewson »

Hi

I'm a newbie to this and wonder if you can give me some advice pls. I've installed the Auto db Backup but when I try to configure it I get:

Information

There is a problem with your timezone setting in the UCP.


Any suggestions as to where I should go to try to fix this please?

Thanks

David

david.matthewson
Member
Member
Posts: 3
Joined: June 2023

Re: [3.3.0] Auto db Backup

#41

Post by david.matthewson »

OK, sorted this. In my UCP it was set to UTC+1 which did not work. Setting it to Europe/London (giving the same actual time) did work.
Thanks

donsenilo
Member
Member
Posts: 3
Joined: December 2022

Re: [3.3.0] Auto db Backup

#42

Post by donsenilo »

Tried it again and get as before
Ein erforderliches Modul existiert nicht: ACP_AUTO_DB_BACKUP

david.matthewson
Member
Member
Posts: 3
Joined: June 2023

Re: [3.3.0] Auto db Backup

#43

Post by david.matthewson »

Yes, great extension - after a minor issue with time zones on our server this works well and is a really useful tool. Thanks to devspace.

proviter
Member
Member
Posts: 7
Joined: August 2023

Re: [3.3.0] Auto db Backup

#44

Post by proviter »

Devspace please tell me.
For this extension, in the ACP - Server settings - Planner of the cron, what value should be set? Yes or No?
I have a value Yes, because another script has been installed to execute.

User avatar
devspace
Owner
Owner
Posts: 280
Joined: October 2022

Re: [3.3.0] Auto db Backup

#45

Post by devspace »

proviter wrote: 03 Sep 2023, 10:25
Devspace please tell me.
For this extension, in the ACP - Server settings - Planner of the cron, what value should be set? Yes or No?
I have a value Yes, because another script has been installed to execute.
To run the autobackup that would need to be set to "No". Never tried running it outside of phpBB and not sure if it would work.

proviter
Member
Member
Posts: 7
Joined: August 2023

Re: [3.3.0] Auto db Backup

#46

Post by proviter »

devspace wrote: 03 Sep 2023, 13:17
proviter wrote: 03 Sep 2023, 10:25
Devspace please tell me.
For this extension, in the ACP - Server settings - Planner of the cron, what value should be set? Yes or No?
I have a value Yes, because another script has been installed to execute.
To run the autobackup that would need to be set to "No". Never tried running it outside of phpBB and not sure if it would work.
Thank you!
I have phpbb 3.3.10. But I have a script of an automatic backup db, with sending to the mail. Schedule launch, in the crown

RomaamoR
Member
Member
Posts: 5
Joined: January 2023

Re: [3.3.0] Auto db Backup

#47

Post by RomaamoR »

I can't go to the extension settings. I always get the answer that - There is a problem with your timezone setting in the UCP.
I tried changing the time to something else. Did not help. How to solve this problem ?

User avatar
devspace
Owner
Owner
Posts: 280
Joined: October 2022

Re: [3.3.0] Auto db Backup

#48

Post by devspace »

RomaamoR wrote: 14 Nov 2023, 21:21
I tried changing the time to something else. Did not help. How to solve this problem ?
Not time but timezone.

Post a screen grab of those settings

RomaamoR
Member
Member
Posts: 5
Joined: January 2023

Re: [3.3.0] Auto db Backup

#49

Post by RomaamoR »

devspace wrote: 14 Nov 2023, 22:04
Not time but timezone.
I tried changing the time zone.
Image

User avatar
devspace
Owner
Owner
Posts: 280
Joined: October 2022

Re: [3.3.0] Auto db Backup

#50

Post by devspace »

That is the Guest setting in the ACP - you need to set the correct timezone in your UCP