Page 28 of 30

The code changes from 100 to 102

Posted: Tue Apr 03, 2007 12:59 pm
by Volunteer Forum
Volunteer Forum wrote:
kkroo wrote: Oh sorry I forgot to reply to that post u made before. All you have to do to upgrade is just recopy the existing files with the new ones.


But all the code changes in the other files then ?

I took a quick look and i found some lines in the newest
version that i did not have in my other files :? :?:


Ok, i have now gone true this step by step.
The code changes from 100 to 102 is:


Image

#
#-----[ OPEN ]------------------------------------------
#
common.php
#
#-----[ FIND ]------------------------------------------
#
if( $board_config['board_disable'] && !defined("IN_ADMIN") && !defined("IN_LOGIN") )

#
#-----[ REPLACE WITH ]------------------------------------------
#
if( $board_config['board_disable'] && !defined("IN_ADMIN") && !defined("IN_LOGIN") && !defined("IN_CRON") )

#
#----------------------------------------------------------
# And the database looked the same on the 100 and 102 version.
# So no edit there...

#
#-----[ Also replace all files: ]------------------------------------------
#

copy root/cron.php to cron.php
copy root/admin/admin_backup.php to admin/admin_backup.php
copy root/includes/cron.php to includes/cron.php
copy root/includes/auto_backup.php to includes/auto_backup.php
copy root/templates/subSilver/admin/admin_backup.tpl to templates/subSilver/admin/admin_backup.tpl
copy root/backups/index.htm to backups/index.htm
copy root/cache/auto_backup/index.htm to cache/auto_backup/index.htm
copy root/language/lang_english/lang_auto_backup.php to language/lang_english/lang_auto_backup.php

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM

And now your version should be updated correctly

Re: [BETA] Automatic Database backup

Posted: Wed Apr 04, 2007 4:08 am
by Volunteer Forum
Btw, two questions...

1.
Why cant i add the:
<img src="cron.php" width="1" height="1" alt="" border="0"/>

In the Admin index page instead ?
(It dosen't run if i add it there)

2.
What was it i could do to not have the forum go offline when making a backup ?
(And why not just add the option in the ACP ? *Go offline when making a backup: Yes/No*)

Re: [BETA] Automatic Database backup

Posted: Wed Apr 04, 2007 7:19 am
by kkroo
If you want to add it in the acp, the path would be:

<img src="../cron.php" width="1" height="1" alt="" border="0"/>

There isnt an option to enable disable this. You always want it disabled because if a user makes a post or change in the DB while it is backing up, it can overload the server.

Re: [BETA] Automatic Database backup

Posted: Fri Apr 06, 2007 12:46 pm
by yakusha
my using a premod system... and sql queries are changing automatic

ex: this query

Code: Select all

CREATE TABLE `phpbb_backup` (
	`phpbb_only` int(1)  NOT NULL,
);
changin

Code: Select all

CREATE TABLE `my_prefix_backup` (
	`my_prefix_only` int(1)  NOT NULL,
);
yes:

Code: Select all

	`my_prefix_only` int(1)  NOT NULL,
and my changed thes

Code: Select all

CREATE TABLE `phpbb_backup` (
	`related_only` int(1)  NOT NULL,
);
:)

thank for all things :)

Re: [BETA] Automatic Database backup

Posted: Fri Apr 06, 2007 2:46 pm
by kkroo
Im sorry but I dont really understand what you mean. Could you try clearing things out?

Re: [BETA] Automatic Database backup

Posted: Tue Apr 24, 2007 5:26 pm
by kavatah
Hello,

First, your mod is great !!
Second, I'm having a little problem:
Everything works fine until now.
One backup every twelve hours.
Sent to my email, save to my forum's backup folder, and uploaded to another FTP server.

And just today, I received an email with this in it:
Subject : An error occured while backing up your database
Failed in get_table_def (show fields) on line352 in/homepages/29/XXXXXXXXXXX/XXXXXX/forum/includes/auto_backup.php
SHOW FIELDS FROM `phpBB_sessions`;

The backup that was saved to my backup folder stopped at the table phpBB_sessions.

Do you know what could be causing this?

Thanks in advance,

Bes tregards,

Kavatah

Re: [BETA] Automatic Database backup

Posted: Wed Apr 25, 2007 4:17 am
by kkroo
Is this continuously happening or did it only happen that one time?

Re: [BETA] Automatic Database backup

Posted: Sat Apr 28, 2007 5:46 pm
by kavatah
Hi,

Well no, only that one time...
It works fine since it happened.

Don't know what happened.

Thanks any way for this great mod

Bye

Re: [BETA] Automatic Database backup

Posted: Sun Apr 29, 2007 4:43 pm
by alez
ok, sorry if my question is somewhere responded (i read a few pages and i didnt find the answer)...
I dont know very well how this works;;; ive install the mod sucesfully with easymod, and ive configure it trough acp... everythings seems to be fine... Now> at the time of "backup", ive found on "backups" folder, 5 files:

phpbb_db_backup_29-04-2007_13-02_acJ8r.sql
phpbb_db_backup_29-04-2007_20-18_ARu7.sql
phpbb_db_backup_29-04-2007_20-20_H5ou.sql
phpbb_db_backup_29-04-2007_20-24_wADs5.sql
phpbb_db_backup_29-04-2007_20-30_iCq4X.sql

All of this are aprox 5mb. But, when i want to extract it, 3 of those files are "corrupted" (thats what winrar says..) :roll:
So, i open the others, but they start with the same tables (auth access, backup, banlist, so on.. till post text) BUT post_text > is not complete!

1. Why 5 files? its it ok?
2. why corrupted?
3. why backup tables in those 2 files are the same?
4. why is the backup not complete? (not only post text table, it also didnt backup tables like words, for ex)

Thanxs! :oops:

pd: ive choosed the basic syntax > Sundays 1 pm
(in advanced syntax 0 13 * * Sun)

Re:

Posted: Sun Apr 29, 2007 5:37 pm
by kkroo
What is happening is the script is exceeding the php memory limit and is dying without fully running through.

This can be resolved in a number of ways:
kkroo wrote: this will happen to very large databases, or with hosts that have a very low php memory_limit. First off make sure that you have the latest version the mod. If you continue to have problems, try increasing you php memory_limit. If that won't work either, ttry excluding the search tables from the backup or tables that are not needed, maybe like a logging table or something. If neither of these work, let me know and I could try to

kkroo wrote: There are 3 ways that I know of:

for example, if you wanted to set it to 16MB:

.htaccess

Code: Select all

php_value memory_limit 16M
OR

ini set, paste this at the after <?php in auto_backup.php

Code: Select all

ini_set("memory_limit", "16M");
OR

you can change the setting in php.ini

Re: [BETA] Automatic Database backup

Posted: Sun Apr 29, 2007 7:14 pm
by alez
1.

Code: Select all

<?php
ini_set("memory_limit", "16M");
/***************************************************************************
*                            auto_backup.php
*                              -------------------
*     begin                : Thu March 23, 2006
*     copyright            : Omar Ramadan
*     email                : princeomz2004@hotmail.com
*
*
****************************************************************************/

if ( !defined('IN_PHPBB') )
like that?

2.

Code: Select all

.htaccess

Code: Select All
    php_value memory_limit 16M


in .htaccess, i only have to paste that? (php_value memory_limit 16M)

:oops: :oops: :oops:
ive donde both things (like i paste above), but still works like before; Thanxs.

Re: [BETA] Automatic Database backup

Posted: Mon Apr 30, 2007 3:56 am
by kkroo
Check your phpinfo to ensure that this setting took affect. If this fails, you can try excluding the search table

Re: [BETA] Automatic Database backup

Posted: Sat May 12, 2007 6:06 pm
by alez
kkroo wrote: Check your phpinfo to ensure that this setting took affect. If this fails, you can try excluding the search table


No search tables include and:
Image

But still fails, any other clue? :oops:

Re: [BETA] Automatic Database backup

Posted: Sat May 12, 2007 7:59 pm
by kkroo
How big did you say your DB was?

Re: [BETA] Automatic Database backup

Posted: Sat May 12, 2007 11:12 pm
by alez
~ 57 mb without search tables...