vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Cron Backup Script Pls... (https://vborg.vbsupport.ru/showthread.php?t=68596)

xTerMn8R 08-21-2004 08:03 PM

Cron Backup Script Pls...
 
Can any one guide me as to How I'd create a script to backup 1 MySQL database using Vbulletin's Scheduler? I use windows 2000 server and vb3.03 I'vetried using this ./includes/cron/backup.php file below, which works fine (the commands) if I telnet and run them from the command line, but doesnt seem to work right using a cron Scheduler, It creates the file but zero Bytes.
Code:

<?php
exec ('mysqldump --add-drop-table -u**** -p**** ctcforum >w:\vBackups\test.sql');
?>

Thanks ...
Peace...

okrogius 08-22-2004 02:28 AM

You shouldn't do this, as if you have a large forum you will receive corrupt backups due to php timeouts. Rely on your OS way of doing crons or scheduled tasks.

xTerMn8R 08-22-2004 07:38 PM

Hey thanks for the Suggestion okrogius, I created a batch file on my server that shells out and runs the mysqldump command and parameters with Windows Task Scheduler and Man this has made my life easy...

Just wish I could Name the file, appended with the date each time it backs up, any suggestions? I'll do some Batch research, havent worked with batch files in a long time ...

Anyway Thanks Again... Server and Site healthy and backed up... :up:

Peace...

Got it with a vb Script that calls tha batch ...

Dennis Olson 08-23-2004 01:34 PM

Just wish I could Name the file, appended with the date each time it backs up, any suggestions?

That's a no-brainer. I create a time/datestamp var in my cron script, and append the contents of the var to the file name (which I set to "ForumBackup"). So my filename ends up being:

ForumBackup-20040815-1345

Works every time....

xTerMn8R 08-23-2004 10:21 PM

Yep I found a visual basic script Stores and passes the date to a shell Var. that is then called to date exactly as ur's except I took the hr and min out.

Thanks for the relpy...

Peace...


All times are GMT. The time now is 01:46 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.01061 seconds
  • Memory Usage 1,715KB
  • 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
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete