[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!
Suggested Hosts
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)
deanmoke
Registered User
Posts: 21
Joined: Tue May 20, 2008 9:05 am

Re: [3.2][RC] Auto db Backup

Post by deanmoke » Wed Feb 08, 2017 10:53 am

deanmoke wrote:
Tue Feb 07, 2017 4:30 am
Is there a fix for this yet? I tried all of the suggestions but no there's no backup being saved.
Thanks,
Dean
My apologies, it is working and saving a backup (just not when I expected).
Dean

User avatar
pikachuturkey
Registered User
Posts: 218
Joined: Wed Dec 20, 2006 10:34 pm
Name: Rıza
Contact:

Re: [3.2][RC] Auto db Backup

Post by pikachuturkey » Wed Feb 08, 2017 3:47 pm

i translated English language files to Turkish (Türkçe). (Auto db Backup version [RC] 2.1.0-rc1.)
i have no permission to add zip format them.

acp_autobackup.php

Code: Select all

<?php
/**
*
* @package Auto db Backup (3.2)
* @copyright (c) 2015 david63
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

/**
* DO NOT CHANGE
*/
if (!defined('IN_PHPBB'))
{
	exit;
}

if (empty($lang) || !is_array($lang))
{
	$lang = array();
}

// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
//
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
// equally where a string contains only two placeholders which are used to wrap text
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
//
// Some characters you may want to copy&paste:
// ’ » “ ” …
//

$lang = array_merge($lang, array(
	'AUTO_DB_BACKUP_COPIES'				=> 'Depolanmış yedekler',
	'AUTO_DB_BACKUP_COPIES_EXPLAIN'		=> 'Sunucuda depolanacak yedeklerin sayısı.<br />0 devre dışı demektir ve tüm yedeklemeler sunucuda depolanır.',
	'AUTO_DB_BACKUP_ENABLE'				=> 'Otomatik veritabanı yedeklemeyi aktive et',
	'AUTO_DB_BACKUP_ENABLE_EXPLAIN'		=> 'Otomatik veritabanı yedeklemeyi aç veya kapat',
	'AUTO_DB_BACKUP_FILETYPE'			=> 'Dosya tipi',
	'AUTO_DB_BACKUP_FILETYPE_EXPLAIN'	=> 'Yedekler için dosya tipini seçin.',
	'AUTO_DB_BACKUP_FREQ'				=> 'Yedekleme sıklığı',
	'AUTO_DB_BACKUP_FREQ_EXPLAIN'		=> 'Yedekleme sıklığını saat cinsinden ayarlayın.',
	'AUTO_DB_BACKUP_OPTIMIZE'			=> 'Yedekleme işleminden önce veritabanını optimize et',
	'AUTO_DB_BACKUP_OPTIMIZE_EXPLAIN'	=> 'Yedeleme işleminden önce sadece optimize olmayan veritabanı tablolarını optimize eder.',
	'AUTO_DB_BACKUP_SETTINGS'			=> 'Otomatik veritabanı yedekleme ayarları',
	'AUTO_DB_BACKUP_SETTINGS_CHANGED'	=> 'Otomatik veritabanı yedekleme ayarları değiştirildi.',
	'AUTO_DB_BACKUP_SETTINGS_EXPLAIN'	=> 'Buradan otomatik veritabanı yedekleme varsayılan ayarlarını düzenleyebilirsin. Sunucu ayarlarınıza bağlı olarak veritabanını sıkıştırabilirsiniz.<br />Tüm yedekler <samp>/store/</samp> klasöründe depolanacak. Yedekleri geriyükleme işlemini <em>Geriyükleme</em> paneli aracılığıyla yapabilirsin.',
	'AUTO_DB_BACKUP_TIME'				=> 'Sonraki yedekleme zamanı',
	'AUTO_DB_BACKUP_TIME_ERROR'			=> '<strong>Sonraki yedekleme zamanı</strong> doğru değil. Tarih gelecekteki bir zaman olarak tanımlanmalı.',
	'AUTO_DB_BACKUP_TIME_EXPLAIN'		=> 'Sonraki veritabanı yedeklemesinin yapılacağı zaman.<br /><strong>Not:</strong>Tarih/zaman; gelecekteki bir tarih olarak belirlenmeli.',

	'DATE_TIME_ERROR'					=> '<strong>Sonraki yedekleme tarihi</strong> geçersiz.',

	'HOUR'		=> 'Saat',
	'MINUTE'	=> 'Dakika',

	'FILETYPE'	=> array(
		'gzip'	=> 'gzip',
		'bzip2'	=> 'bzip2',
		'text'	=> 'metin',
	),

	'VERSION'							=> 'Sürüm',
));
ext_autodbbackup.php

Code: Select all

<?php
/**
*
* @package Auto db Backup (3.2)
* @copyright (c) 2015 david63
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

/**
* DO NOT CHANGE
*/
if (!defined('IN_PHPBB'))
{
	exit;
}

if (empty($lang) || !is_array($lang))
{
	$lang = array();
}

// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
//
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
// equally where a string contains only two placeholders which are used to wrap text
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
//
// Some characters you may want to copy&paste:
// ’ » “ ” …
//

$lang = array_merge($lang, array(
	'VERSION_32' => 'Bu eklenti için phpBB 3.2.x (veya daha üst sürüm) gerekmekte',
));
info_acp_autodbbackup

Code: Select all

<?php
/**
*
* @package Auto db Backup (3.2)
* @copyright (c) 2015 david63
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

/**
* DO NOT CHANGE
*/
if (!defined('IN_PHPBB'))
{
	exit;
}

if (empty($lang) || !is_array($lang))
{
	$lang = array();
}

// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
//
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
// equally where a string contains only two placeholders which are used to wrap text
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
//
// Some characters you may want to copy&paste:
// ’ » “ ” …
//

$lang = array_merge($lang, array(
	'ACP_AUTO_DB_BACKUP'			=> 'Otomatik Veritabanı Yedekleme',
	'ACP_AUTO_DB_BACKUP_SETTINGS'	=> 'Otomatik yedekleme ayarları',

	'LOG_AUTO_DB_BACKUP'			=> '<strong>Otomatik veritabanı yedekleme tamamlandı</strong>',
	'LOG_AUTO_DB_BACKUP_SETTINGS'	=> '<strong>Otomatik Veritabanı Yedekleme ayarları değiştirildi</strong>',
));
Healt For Everyone ==> www.saglikforum.org

User avatar
david63
Jr. Extension Validator
Posts: 13197
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 » Wed Feb 08, 2017 3:53 pm

I have been looking at the "timing" issues today to try and make some sense out of it.

The problem is that there are three (at least) timezones involved:
  • The default board timezone
  • The user timezone
  • The server timezone
Looking at this I don't think that there is a "one size fits all" solution where one, or more, of these timezones is different and it is more of a question of which is the lease worst option, bearing in mind that once the autobackup is running it will run at the same interval no matter which one is used - unless one of them is changed.

The most obvious timezone to use would be that of the user and this works fine for the ACP, unless you have multiple Admins in different timezones. This will also create a problem when running the actual cron job as that can be initiated by anyone in any timezone.

The server timezone can be several hours out of sync with that of the board.

My thoughts at the moment are to use the user timezone in the ACP and the board timezone for the cron (which is basically what is happening now - although I have "tweaked" it slightly) or I could add an option to allow the user to set the timezone (user, board, server) for all actions.

Thoughts anyone.
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
KhurramMunawar
Registered User
Posts: 534
Joined: Tue Mar 25, 2014 2:20 am
Location: Islamabad, Pakistan
Name: Khurram Munawar
Contact:

Re: [3.2][RC] Auto db Backup

Post by KhurramMunawar » Wed Feb 08, 2017 9:22 pm

Dear David

I think " Backup Now " option and " Download Backup on Computer" will make this extension more effective for the users.

Thanks for the intelligent extension by the way.
My forum:
DearHelper.org
Get Free Traffic To Your Website
Trafficonic.com - Free Traffic To Your Website

User avatar
david63
Jr. Extension Validator
Posts: 13197
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 » Wed Feb 08, 2017 9:26 pm

KhurramMunawar wrote:
Wed Feb 08, 2017 9:22 pm
Dear David

I think " Backup Now " option and " Download Backup on Computer" will make this extension more effective for the users.

Thanks for the intelligent extension by the way.
Why? Those are the basic functions of the core backup.
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
KhurramMunawar
Registered User
Posts: 534
Joined: Tue Mar 25, 2014 2:20 am
Location: Islamabad, Pakistan
Name: Khurram Munawar
Contact:

Re: [3.2][RC] Auto db Backup

Post by KhurramMunawar » Wed Feb 08, 2017 9:53 pm

Oh yes.
Oh yes.

:mrgreen:


i forgot that. :D
My forum:
DearHelper.org
Get Free Traffic To Your Website
Trafficonic.com - Free Traffic To Your Website

bcurran3
Registered User
Posts: 117
Joined: Sat Aug 29, 2015 2:52 am

Re: [3.2][RC] Auto db Backup

Post by bcurran3 » Wed Feb 08, 2017 10:00 pm

david63 wrote:
Wed Feb 08, 2017 3:53 pm
I have been looking at the "timing" issues today to try and make some sense out of it.

The problem is that there are three (at least) timezones involved:
  • The default board timezone
  • The user timezone
  • The server timezone
Looking at this I don't think that there is a "one size fits all" solution where one, or more, of these timezones is different and it is more of a question of which is the lease worst option, bearing in mind that once the autobackup is running it will run at the same interval no matter which one is used - unless one of them is changed.

The most obvious timezone to use would be that of the user and this works fine for the ACP, unless you have multiple Admins in different timezones. This will also create a problem when running the actual cron job as that can be initiated by anyone in any timezone.

The server timezone can be several hours out of sync with that of the board.

My thoughts at the moment are to use the user timezone in the ACP and the board timezone for the cron (which is basically what is happening now - although I have "tweaked" it slightly) or I could add an option to allow the user to set the timezone (user, board, server) for all actions.

Thoughts anyone.
Yeah, there's a Guest timezone too. :)

I think the INTUITIVE answer is whatever time is displayed in ACP/Board settings/Cron Status is the date/time that most people are going to expect things to happen by.

As alternative, if (this->user->data['user_id'] != 2) should be THE admin account and time could be based on that, but I think the first suggestion is the the best suggestion IMHO.

I don't know the code, I've only peaked at it once or twice, but maybe the answer (variable) lies somewhere in /adm/style/timezone_option.html?

wilf_t
Registered User
Posts: 14
Joined: Wed Nov 05, 2014 3:44 pm

Re: [3.2][RC] Auto db Backup

Post by wilf_t » Thu Feb 09, 2017 6:21 pm

I had a bit of trouble as old version didnt run as we now know, uninstalled it and put new one in but couldn't set the date past 1972to get it started, so went thorugh uninstall delete data on the both versions and put it back, hey presto we had success. As reports it didn't pickup on the time I set but just left it running for 6 hours intervals, some time or other it kicked it on its own when it felt like it and has run every 6 hours since :D

I agree all ext out of date should have been listed before atempting updates as was a right bodge up to get going again.

User avatar
david63
Jr. Extension Validator
Posts: 13197
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 » Fri Feb 10, 2017 1:24 pm

Updated to RC2

Only change is fix for timezones (hopefully)

To update
  • Disable
  • Delete data
  • Upload new version
  • Enable
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

deanmoke
Registered User
Posts: 21
Joined: Tue May 20, 2008 9:05 am

Re: [3.2][RC] Auto db Backup

Post by deanmoke » Sat Feb 11, 2017 8:52 am

RC2 works for me :D
DB created and stored at the set time (Admin/board timezone and after forum activity).
Cheers!
Dean

User avatar
david63
Jr. Extension Validator
Posts: 13197
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 Feb 11, 2017 8:59 am

@ deanmoke

Thanks for that.

The only time that I can see this being an issue now is if there is more than one Admin who are in different timezones and they also have access to backups - a situation that I doubt will be very common.
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
supanet
Registered User
Posts: 227
Joined: Sat Dec 15, 2012 4:20 pm
Location: UK
Contact:

Re: [3.2][RC] Auto db Backup

Post by supanet » Sat Feb 11, 2017 10:22 am

david63 wrote:
Sat Feb 11, 2017 8:59 am
@ deanmoke

Thanks for that.

The only time that I can see this being an issue now is if there is more than one Admin who are in different timezones and they also have access to backups - a situation that I doubt will be very common.
Agreed not common but it would be in my case. :(

User avatar
david63
Jr. Extension Validator
Posts: 13197
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 Feb 11, 2017 10:26 am

supanet wrote:
Sat Feb 11, 2017 10:22 am
Agreed not common but it would be in my case.
How big an issue would it be, bearing in mind that once the cycle is set up then you will get the backup every x hours?
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
supanet
Registered User
Posts: 227
Joined: Sat Dec 15, 2012 4:20 pm
Location: UK
Contact:

Re: [3.2][RC] Auto db Backup

Post by supanet » Sat Feb 11, 2017 11:43 am

david63 wrote:
Sat Feb 11, 2017 10:26 am
supanet wrote:
Sat Feb 11, 2017 10:22 am
Agreed not common but it would be in my case.
How big an issue would it be, bearing in mind that once the cycle is set up then you will get the backup every x hours?
OK will test it out over the weekend. ;)

steveprentice
Registered User
Posts: 5
Joined: Thu Apr 11, 2013 8:37 pm

Re: [3.2][RC] Auto db Backup

Post by steveprentice » Mon Mar 06, 2017 3:33 pm

Hi,

Firstly, thanks very much for this extension, loving it. :)

I've a small issue, and wondered if it was expected... I've set backup to happen at 3am once every 24 hours. I've found over the last few days that it's been getting later and later, today the backup didn't happen till after 9am. That's ok, I understand that's part of cron and the first person to hit.

However, checking the auto backup settings, I note that the next backup time has changed to the 9am time, so I guess the next backup may not be till 10am, and it'll up update to 10am.. and on and on.

Is there any way to make the 3am stick there and not update/change? I realise that if the cron doesn't start till 9am, and then running it again at 3am wouldn't be 24 hours after.... but that's fine with me.

I want it to be at 3am so that I can run a scheduled task later in the morning to copy the resulting file into google drive, but if the slot is moving forward all the time then that's guesswork.

Am I being silly?

Many thanks!

Steve

Post Reply

Return to “Extensions in Development”

Who is online

Users browsing this forum: donsenilo, oBot, posey and 24 guests

cron