[3.2][RC] Auto db Backup

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Ideas Centre
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
tlem
Registered User
Posts: 109
Joined: Sun Jan 24, 2016 4:47 pm
Location: Bordeaux (France)
Name: Thierry
Contact:

Re: [3.2][RC] Auto db Backup

Post by tlem » Tue Sep 24, 2019 6:17 pm

Hi.
Here it is the french translation for the RC6.
Rename it without the .txt extention (don't know why zip files are not authorized).
Attachments
autodbbackup-3.2-RC6-Lang_Fr.zip.txt
(5.04 KiB) Downloaded 5 times

lochness
Registered User
Posts: 56
Joined: Tue Aug 07, 2007 12:04 pm

Re: [3.2][RC] Auto db Backup

Post by lochness » Sat Oct 12, 2019 9:20 pm

One question, I know barely enough php to edit pretty basic stuff, so before modifying and breaking the extension (got me quite a time to notice I had to delete part of the default folder name already...), I'd rather ask here.

If I want to store the backup files in a different folder, the line I have to change is just this one on auto_db:backup.php file, or are there other files I have to modify?

Code: Select all

$location		= $this->phpbb_root_path . '/store/';
I need to store the db backups on a mounted drive, so the path will be not relative to phpbb installation but to the server. Like this, I'm assuming

Code: Select all

$location		= $this-> 'home/mounted/store/';
Am I right?

The manual gzips I make are usually 4 Gb and have to be run from the terminal and not the ACP.

User avatar
david63
Registered User
Posts: 16700
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: [3.2][RC] Auto db Backup

Post by david63 » Sun Oct 13, 2019 7:56 am

I have never tried storing the backups anywhere else but in theory changing the $location variable should work just as long as it is absolute and the folder has the correct permissions.

Just one small point - if you are entering an absolute path you do not need the $this->
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

lochness
Registered User
Posts: 56
Joined: Tue Aug 07, 2007 12:04 pm

Re: [3.2][RC] Auto db Backup

Post by lochness » Sun Oct 13, 2019 10:24 am

Thanks for the tip, David63 :)

Will try the extension after the schedule server maintenance in 10 days and see how it works.

User avatar
Gumboots
Registered User
Posts: 191
Joined: Fri Oct 11, 2019 1:59 am

Re: [3.2][RC] Auto db Backup

Post by Gumboots » Tue Oct 15, 2019 12:47 am

I'm going to have a play with this. I also don't want to use the default /store folder (I prefer to have db backups not web-accessible) so lochness's question is quite handy for me too. I'll try the relevant absolute path and see how it goes.

One question: the installation instructions at your GitHub repo say:
Download the latest release and unzip it.
Unzip the downloaded release and copy it to the ext directory of your phpBB board.
Which would result in /ext/autodbbackup-3.2

On the other hand, the installation instructions in the OP of this thread say:
Download the latest release and unzip it.
Upload the unzipped files to root/ext/david63/autodbbackup
Which would result in /ext/david63/autodbbackup/autodbbackup-3.2

Just to save head scratching, can you clarify which is the correct result to aim for?

User avatar
dingus33
Registered User
Posts: 125
Joined: Fri Sep 29, 2017 11:11 am

Re: [3.2][RC] Auto db Backup

Post by dingus33 » Tue Oct 15, 2019 1:23 am

nice looking extension.

some info i think would be helpful to include in the OP:
  • which db types are supported?
  • what is the underlying backup mechanism? does it just hook the built-in phpBB backup/restore functionality?
  • can backups be restored without using phpBB at all?
    • if not, is there a suggested procedure for restoring in an environment without a functional phpBB installation? would it be to just wipe your db, use the installer to create a fresh phpBB db, enable your extension, and then restore?

User avatar
david63
Registered User
Posts: 16700
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: [3.2][RC] Auto db Backup

Post by david63 » Tue Oct 15, 2019 6:02 am

Gumboots wrote:
Tue Oct 15, 2019 12:47 am
Just to save head scratching, can you clarify which is the correct result to aim for?
/ext/david63/autodbbackup/
dingus33 wrote:
Tue Oct 15, 2019 1:23 am
which db types are supported?
All phpBB suported db types
dingus33 wrote:
Tue Oct 15, 2019 1:23 am
does it just hook the built-in phpBB backup functionality?
Yes
dingus33 wrote:
Tue Oct 15, 2019 1:23 am
can backups be restored without using phpBB at all?
Yes
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
Gumboots
Registered User
Posts: 191
Joined: Fri Oct 11, 2019 1:59 am

Re: [3.2][RC] Auto db Backup

Post by Gumboots » Tue Oct 15, 2019 6:26 am

Thanks. I thought it might be, but wanted to be sure.

User avatar
Gumboots
Registered User
Posts: 191
Joined: Fri Oct 11, 2019 1:59 am

Re: [3.2][RC] Auto db Backup

Post by Gumboots » Sat Oct 19, 2019 1:19 am

Seems to have a small bug with the time settings. I'm trying to set it for 01:00, but it keeps going back to 12:00 whenever I submit the page.

ETA: Hmm. Actually it seems to be all over the place. It keeps coming up with random time settings regardless of what I submit. I've disabled it for now.

User avatar
david63
Registered User
Posts: 16700
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: [3.2][RC] Auto db Backup

Post by david63 » Sat Oct 19, 2019 1:07 pm

Gumboots wrote:
Sat Oct 19, 2019 1:19 am
Seems to have a small bug with the time settings. I'm trying to set it for 01:00, but it keeps going back to 12:00 whenever I submit the page.

ETA: Hmm. Actually it seems to be all over the place. It keeps coming up with random time settings regardless of what I submit. I've disabled it for now.
I suspect that it is part of a problem that I have had for some time and it is all tied up with timezones (user, server, board)

I have tried another fix that I hope should cure the problem if you would like to try it - it needs re-downloading.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
Gumboots
Registered User
Posts: 191
Joined: Fri Oct 11, 2019 1:59 am

Re: [3.2][RC] Auto db Backup

Post by Gumboots » Sat Oct 19, 2019 10:27 pm

Sure. I'll give it a go. Ideal test case. Server is in France, I'm in Australia, and the forum is probably still on US time.

User avatar
Gumboots
Registered User
Posts: 191
Joined: Fri Oct 11, 2019 1:59 am

Re: [3.2][RC] Auto db Backup

Post by Gumboots » Sat Oct 19, 2019 10:44 pm

Ok, looking good so far. Have entered 19:00 New York time (inherited forum time, from previous owner). Appears to have accepted it, with no funny business. Should run a backup in about 20 minutes, all being well. Will let you know.

User avatar
Gumboots
Registered User
Posts: 191
Joined: Fri Oct 11, 2019 1:59 am

Re: [3.2][RC] Auto db Backup

Post by Gumboots » Sat Oct 19, 2019 11:08 pm

Ok, it hasn't made a backup yet. Obvious next question: is the time shown in the ACP interface for this extension the forum time, or the server time?

If it's forum time, there's a problem. If it's server time, I'll reset it to something convenient and run another check.

ETA: Just tried another check on the assumption it might be displaying server time. Still no backup. Will try it with Australian time and see what happens.

User avatar
KillBill.
Registered User
Posts: 600
Joined: Tue Jun 02, 2009 4:07 pm
Contact:

Re: [3.2][RC] Auto db Backup

Post by KillBill. » Sat Oct 19, 2019 11:33 pm

Hi, I just got a report that the date is showing up incorrectly in one of my extensions.
Unfortunately, after a thorough review, I realized that the phpBB user-> format_date function sometimes shows the time incorrectly, so this is a phpBB BUG, so the phpBB team should review this issue.

Here is an example: If I set 2019-10-20 20:00 as a time, the phpBB user-> format_date function returns the time correctly.
However, if I enter 2019-11-01 00:00 then return an invalid value.

Example: 2019-11-01 00:00 convert to unix format 1572559200

Here I add the Hungarian +2 hour timezone.
if use PHP function gmdate("Y-m-d\ H:i", 1572559200 + (2 * 3600)) add correct value :: 2019-11-01 00:00

I will not add timezone here because phpBB adds it by default
if use phpBB $this->user->format_date(1572559200, 'Y-m-d H:i', true) add incorrect value :: 2019-10-31 23:00

Interestingly, timezone is +2 hours, but phpBB is -1 hour mistaken. :roll:

Edit: This post is wrong, I was confused by the time stamp, with gmmktime function.
Last edited by KillBill. on Sun Oct 20, 2019 12:56 am, edited 1 time in total.

User avatar
Gumboots
Registered User
Posts: 191
Joined: Fri Oct 11, 2019 1:59 am

Re: [3.2][RC] Auto db Backup

Post by Gumboots » Sat Oct 19, 2019 11:38 pm

Weird.

I just ran a third test, and it doesn't create a backup if I assume it's Australian time either. So it appears to be calmly accepting any input for time and date, but not producing any backup files.

Have tried it by assuming three different times zones: New York, Paris, Australian east coast. No backup files created for any of those three.

Post Reply

Return to “Extensions in Development”