vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   [vbcron] Automatic database backup [v1.3] (https://vborg.vbsupport.ru/showthread.php?t=62149)

Boofo 03-08-2004 12:49 PM

Quote:

Originally Posted by kristian
Does my server need to run with 'Safe Mode' OFF for this to work?

It shouldn't make a difference. Do you have the backup directory chmoded to 777? And are you sure you have the correct path to the backup directory?

WildEye 03-08-2004 07:32 PM

Quote:

Originally Posted by Boofo
How about the day of the week and the date behind it? Like this:

Sunday-Mar_3_2004.tz?

EDIT: I figured it out. This is what I have now:

$cur_date = date('l-F_j_Y');

and the filename is:

Monday-March_8_2004.tar.gz

Works like a charm, Brad! Thank you, sir. ;)

Thanks alot to both of you. Just had to include the path to mysqldump, which I misstyped a couple of times (and forgot to include the '...

Very nice feature, which i'll see if works tomorrow morning after my scheduled backup at 6am :) (already tested the run now thing)

Mr. HillBilly 03-08-2004 08:39 PM

What settings would I set to make the script run every 2 days in the admincp task area?

WildEye 03-09-2004 07:35 AM

Small problem...

While the task ran as scheduled and made the file in the correct area, the time was half an hour late... and there is no record of the script being run in the log. (view all). I selected log entries: yes.

Any tips?

cteselle 03-09-2004 03:24 PM

I was wondering about this as well... I looked at the other cron scripts and noticed a call to the log_cron_action function. I tried adding:

PHP Code:

log_cron_action('Database Backup Completed'$nextitem); 

to the end of the file, and the script stalled altogether. Anyone know why this function wouldn't work right? :ermm:

Pikok 03-12-2004 06:20 AM

Quote:

Originally Posted by WildEye
Small problem...

While the task ran as scheduled and made the file in the correct area, the time was half an hour late... and there is no record of the script being run in the log. (view all). I selected log entries: yes.

Any tips?

There has to be someone on your site at the time it's set to run or it won't run until the next time someone visits.. Also, only one script's run each time, even if more than one are waiting to be ran.

mOdEtWo 03-12-2004 06:49 AM

Quote:

Originally Posted by Brad.loo
Planned improvements:

Zip file type support
Delete last backup when doing current one
Close boards when backing up
Clear session table before backup
Options to NOT include stuff like the postcache in the backup

When? :)

Martyjp 03-14-2004 12:33 PM

Quote:

Originally Posted by Boofo
It shouldn't make a difference. Do you have the backup directory chmoded to 777? And are you sure you have the correct path to the backup directory?


What format for the path should we be using?

/home/space/public_html/backupdir or ./backupdir ?

*arie 03-14-2004 12:39 PM

thanks, this worked for me! :p

btw, Martyjp , i used the 1st path you mentioned.
/home/space/public_html/backupdir

Morpheus84 03-14-2004 01:36 PM

nobody could help me ? :(

MrZeropage 03-14-2004 04:11 PM

I hope the "extended version" will be released soon, which switches the board offline for the backup-process - and of course turns it on again after finishing ;)

Christine 03-14-2004 10:51 PM

ThePartyBorg,

I am also backing up to another server. Why not just write a system cron that will take the datadump from this vBcron and ftp it to the other box?

Brad.loo,

Nice job! One question -- would it be possible to exclude tables from this (search/word/etc) so as to pare down the size of the datadump?

Boofo 03-14-2004 10:53 PM

Quote:

Originally Posted by Martyjp
What format for the path should we be using?

/home/space/public_html/backupdir or ./backupdir ?

/home/space/public_html/backupdir

lasto 03-14-2004 11:28 PM

anychance of being able to actually reload the backup back though this proggie as i dont have a clue of how to telnet in and do it that way.

On vb2 someone made a hack that did just this it saved to a folder on the server and you could also re-install it if needed.If this was added this would be a cool hack esp for someone like me as this is one of the major reasons i wont update to vb3 cause my host wont allow outside connections so i cant use a program like MYSQLfront to do it all for me.

Plz consider it :)

Marulatree 03-15-2004 01:37 PM

I'm getting this error:

Parse error: parse error in /home/******/public_html/forum/includes/cron/****.php on line 31

TCSoul 03-15-2004 05:25 PM

Quote:

Originally Posted by Morpheus84
At my vB3 the Script won't will be work :(
I click on "Do it now" and my vB says "All done."
On my FTP Server there's nothing to see about a backup :(

Plz help.

I'm actually experiencing the same problem as Morpheus, and I'm trying to diagnose it a little bit further. I'm thinking that the script is being found just fine, but it is exiting out of itself because of the first line of the script:


PHP Code:

if ($DB_site NULL)
{
    exit;


Now then, I am already fairly certain this is a stupid question... BUT.... I sure don't see any variables called $DB_site anywhere in this file. Does it make sense that that would be the cause of the problem? I don't really think so, because everybody else can seem to get this working fine... That said, would this problem result from typing an improper path name in teh actual script. I'm confused because vb says it is 'All Done', but nothing is actually happening, nor is anythgin being registered in my Scheduled Tasks log....

mOdEtWo 03-16-2004 06:17 AM

Quote:

Originally Posted by TCSoul
BUT.... I sure don't see any variables called $DB_site anywhere in this file. Does it make sense that that would be the cause of the problem? I don't really think so, because everybody else can seem to get this working fine...

Nah, it hasn't got anything to do with vB. It's using MySQLdump, a command to backup databases to files, and you specify the database name in the php script.

Anyway, Brad.loo, s'up? When can we expect an update with the new features? I think this is one of the best "hacks"/additions to vB3 so far. So keep up the good work! https://vborg.vbsupport.ru/external/2011/01/19.gif

Marulatree 03-16-2004 11:46 AM

bump?

NTLDR 03-16-2004 12:02 PM

Quote:

Originally Posted by TCSoul
PHP Code:

if ($DB_site NULL)
{
    exit;



PHP Code:

if ($DB_site == NULL)
{
    exit;


That is what that section should be like.

BBQ 03-16-2004 01:34 PM

I vote for the ability to move the backup to a different server too!
I would like to have the backups ftp'd to my home ftp-server, but i doubt i can set any system cron's on my hosting site.

Symbian.info 03-17-2004 01:11 PM

Quote:

Originally Posted by Brad.loo
This is a vbcron script that will backup your database to a .sql file on your server.

You need MySQLdump for this to work, also a folder chmoded to 775 (or 777).

You will need to change the information here for it to work correctly on your server:

PHP Code:

// Set these vars up to to suit your server
define('DB_HOST''localhost'); // database host
define('DB_USER''user'); // database username
define('DB_PASSWORD''db_pass'); // database password
define('DB_NAME''vbulletin'); // vbulletins database name
define('DUMP_PATH''/path/to/dump/folder'); // path to where db backup will be stored
define('DUMP_MAKE_TAR'1); // set this to 1 for the backup to be compressed in a .tar.gz file
// end changes 

Remember to upload this script to /vbroot/includes/cron!!

Does not work for me:-( Get:

MySQL backup

All Done

vBulletin v3.0.0 Release Candidate 3, Copyright ?2000-2004, Jelsoft Enterprises Ltd.


Fatal error: Call to undefined function: query() in /home/mywebiste/www/forum/includes/functions.php on line 501


But no backup is made:-(

alkahf 03-17-2004 04:14 PM

That is the best hack in 2004.

Thank you

alkahf 03-18-2004 11:22 AM

Hello
Yesterday I installed this hack like that :

https://vborg.vbsupport.ru/

Today I login to Ftp and I see that :

https://vborg.vbsupport.ru/

Tell me please what the problem?

Thank you

heynurse 03-19-2004 06:55 AM

Quote:

Originally Posted by Symbian.info
Does not work for me:-( Get:

MySQL backup

All Done

vBulletin v3.0.0 Release Candidate 3, Copyright ?2000-2004, Jelsoft Enterprises Ltd.


Fatal error: Call to undefined function: query() in /home/mywebiste/www/forum/includes/functions.php on line 501


But no backup is made:-(

I had this problem too at first, I had a space in my folder name, I removed the space and it worked fine. Not sure that will help you or not, but thought I'd try.

Natch 03-19-2004 10:39 PM

Quote:

Originally Posted by alkahf
Hello
Yesterday I installed this hack like that :

http://www.vbulletinclub.com/images/scheduled.png

Today I login to Ftp and I see that :

http://www.vbulletinclub.com/images/backup.png

Tell me please what the problem?

Thank you

No problem - except it seems you have the hack setup to run every minute ...

alkahf 04-03-2004 04:07 AM

Quote:

Originally Posted by Natch
No problem - except it seems you have the hack setup to run every minute ...

Thank you Natch
But did you notice ( in my images ) that hack does not deleted last backup files?
untill now I deleted laste backup files manualy every day.
Tell me please what's the problem ?

Best regards :)
alkahf

Onkel_Tom 04-03-2004 09:36 PM

This Hack only makes a backup of the database !
There ist no code for deleting old backups.

If you want to do that you have to add a line like
exec('rm ' .DUMP_PATH. '/yourolddatabasename.tar.gz');

in your cron_dbbackup.php file before backing up the actual db

Natch 04-05-2004 03:21 AM

Or you can cause the hack to overwrite with the latest backup (weekly) by using the day of the week modification, instaed of the unix timestamp filename...

Onkel_Tom 04-06-2004 06:13 PM

arggh !
I configured in the options to log the activity of this backup script, but I no activities are logged !
Script is running fine every day and backing up the db.

anybody an answer or solution ?

paulomt1 04-06-2004 08:39 PM

Don'r work for me. no backups recorded.

:
Database Backup

Done

vBulletin v3.0.0, Copyright ©2000-2004, Jelsoft Enterprises Ltd.

My defs:
// Set these vars up to to suit your server
define('DB_HOST', 'localhost'); // database host
define('DB_USER', 'dbusername'); // database username
define('DB_PASSWORD', 'dbpass'); // database password
define('DB_NAME', 'dbname'); // vbulletins database name
define('DUMP_PATH', '/public_html/foruns/dbBackup'); // path to where db backup will be stored
define('DUMP_MAKE_TAR', 1); // set this to 1 for the backup to be compressed in a .tar.gz file
// end changes

What I made wrong?

Onkel_Tom 04-06-2004 09:57 PM

Quote:

Originally Posted by paulomt1
define('DUMP_PATH', '/public_html/foruns/dbBackup'); // path to where db backup

Is this your correct absolute path to your folder ?
also there is a typo in forums ;)

Did you change your /forums/dbBackup folder to 777 with chmod ?

paulomt1 04-06-2004 11:22 PM

Quote:

Originally Posted by Onkel_Tom
Is this your correct absolute path to your folder ?
also there is a typo in forums ;)

Did you change your /forums/dbBackup folder to 777 with chmod ?

Thanks, the problem was the absolute path.

Now work great:)

anabolicedge 04-08-2004 06:29 AM

Well this seems to be creating 3 new files in my backup folder but i'm still getting this error


Backup

Done

vBulletin v3.0.0, Copyright ©2000-2004, Jelsoft Enterprises Ltd.

Fatal error: Call to undefined function: query() in /home/anabol/public_html/forum/includes/functions.php on line 500


Can someone help?

anabolicedge 04-08-2004 06:30 AM

oh and the files are

error.txt
*.sql - 0.13GB
*.tar.gz - 15mbs

Dark_Wizard 04-11-2004 03:18 PM

Interesting hack and I could use this for a customers site, one quick question though, any plans on implementing a feature to email the backup? If not I will add it for myself as I could really use this feature...

Boofo 04-11-2004 04:04 PM

Quote:

Originally Posted by Dark_Wizard
Interesting hack and I could use this for a customers site, one quick question though, any plans on implementing a feature to email the backup? If not I will add it for myself as I could really use this feature...

I'd be intersted in that, also, buddy, if you don't mind sharing. ;)

Dark_Wizard 04-11-2004 04:15 PM

Quote:

Originally Posted by Boofo
I'd be intersted in that, also, buddy, if you don't mind sharing. ;)

NP...just waiting on the author to see if he wants to do it first since it is his hack otherwise I would like his permission. ;)

Boofo 04-11-2004 04:25 PM

You could always PM it if you come up with something before you hear from the author. ;)

Dark_Wizard 04-11-2004 05:48 PM

Quote:

Originally Posted by Boofo
You could always PM it if you come up with something before you hear from the author. ;)

True...I'm almost done with it and have added zip as well....I will PM him with it once completed and fully tested.

Boofo 04-11-2004 05:51 PM

Thank you, sir. Will be looking forward to it. ;) I have the attchmnets in PMs hack on my site if that will make it easier for you. ;)


All times are GMT. The time now is 11:44 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01483 seconds
  • Memory Usage 1,843KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_php_printable
  • (18)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete