vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Administrative and Maintenance Tools - vB Database Backup (Lite) (https://vborg.vbsupport.ru/showthread.php?t=201319)

Paul M 01-13-2015 11:29 AM

If you copied the files and created a new cron task there isnt any reason you could not do that.

valdet 02-12-2015 02:40 PM

Quote:

Originally Posted by Paul M (Post 2532254)
If you copied the files and created a new cron task there isnt any reason you could not do that.

I thought of that, but the problem is the settings on vB Admin Panel. My current setting is
Code:

Date Format:  d
How to make them differentiate for two backup options that we need: Daily and Monthly.

How to add another option so besides taking daily backups, it also takes backups on 1-st of every month. Or maybe I'm missing something too obvious.

Please advise.

Thanks

Paul M 02-14-2015 08:25 PM

You would need to override the options in the copies you make (hard code them).

valdet 02-16-2015 03:01 PM

Quote:

Originally Posted by Paul M (Post 2537446)
You would need to override the options in the copies you make (hard code them).

Ok thanks,

From your mysqlbackup.php file, I see these rows referencing the settings

Code:

                $this->DATE = date($this->OPTIONS['cbu_date']);
                $this->PREFIX = &$this->OPTIONS['cbu_prefix'];
                $this->DUMP_PATH = &$this->OPTIONS['cbu_path'];

Should they be hardcoded on to a new mysqlbackup2.php like

Code:

                $this->DATE = date($M);
                $this->PREFIX = &monthly-backup;
                $this->DUMP_PATH = &/home/user/my-custom-path/;

Please advise what would be the correct hardcoded part

Thanks

valdet 02-18-2015 08:46 AM

Ok this is how you do it.

1. Make copies of the two product files: mysqlbackup2.php and cron/cronbackup2.php
2. Add three extra settings to product:
cbu_date2: M
cbu_prefix2: monthly-backup and
cbu_path2: /home/user/my-custom-path/
3. Make this change at mysqlbackup2.php
From
Code:

                // File Information
                $this->DATE = date($this->OPTIONS['cbu_date']);
                $this->PREFIX = &$this->OPTIONS['cbu_prefix'];
                $this->DUMP_PATH = &$this->OPTIONS['cbu_path'];

to
Code:

                // File Information
                $this->DATE = date($this->OPTIONS['cbu_date2']);
                $this->PREFIX = &$this->OPTIONS['cbu_prefix2'];
                $this->DUMP_PATH = &$this->OPTIONS['cbu_path2'];

4. Make this change inside cronbackup2.php
From
Code:

  require_once(DIR.'/includes/mysqlbackup.php');
to
Code:

require_once(DIR.'/includes/mysqlbackup2.php');
5. Add new Scheduled Task to start at first day of each month and to run it from cronbackup2.php
6. Done

It was too easy once you figure out, but thanks to Paul for giving the hints. Step 2 was key.

I hope someone finds this useful.


All times are GMT. The time now is 05:48 AM.

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.01687 seconds
  • Memory Usage 1,732KB
  • 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
  • (7)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete