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)

Vinyljunky 01-30-2009 12:49 PM

Quote:

Originally Posted by FCDobbs (Post 1728176)
But could you advise as to how I might be able to set up a CRON job to delete folders which are more than 7 days old ?

Thanks

I'd like to be able to do that too :)

Paul M 01-30-2009 03:49 PM

You could just change the time format in the config to use the day of the week, this is what I do so I only ever have 7 folders (Monday to Sunday).

Code:

$backup['DATE'] = 'l'; // Lowercase 'L'

FCDobbs 01-30-2009 03:56 PM

Paul, never mind my earlier request.

I have successfully built a VB script (Windows Scripting Host) which:

1. Invokes Windows FTP command to connect to my site host server and list out all the folder names for all the backups.
2. Examines these folder names (each is actually the date the folder was created),
does a numerical check against todays date, and stores the information for all folders which are more than 7 days old, and stores the information for all folders which are 7 days old or less.
3. Loops through all the folder names which are more than 7 days old, and creates/runs a Windows FTP job to delete each folder.
4. Loops through all the folder names which are 7 or less days old (I want to copy them to my computer for a second backup), and copies the file in each one to my computer.
Actually, it first checks to see if the folder already exists on my computer.
If so, it ignores copying that file; if not, it creates that folder, then copies the file over.
This is also done via a Windows FTP job.

Now I merely schedule this task to run every day on my computer, and presto... it all runs unattended for me, and does exactly what I want.

Perfect.

By the way.... if anyone would like a copy of my script, just PM me and I'll be happy to send it to you.
Of course, it will be "bare bones"... you will have to insert/modify the code to accommodate your FTP ID and password, and your server backups folder structure, and your PC folder structure. But is is significantly commented so you should be able to do this quite easily.

Cheers,

Phaedrus 01-30-2009 05:41 PM

Quote:

Originally Posted by Yonatan (Post 1727102)
Oops :S
by mistake i wirte "backup" instead of "backups".
but, in backups folder. it's make folders(like: 2009-Jan-28 and etc), but not sql files.

Check inside the folders.

Vaupell 01-30-2009 06:15 PM

well installed, did force cron to run a backup worked like a charm
downloaded backup aswell.

this might be a FAQ- if so, could u add it to your post for mySQL newbs like me.
How do i restore the backup if i needed to, i dont right now, but would be nice to
know when i get to the point where i need to restore ;)

I got phpmyadmin acces to mySQL server at the webhost. ;)

no rush..

PS: Installed ;)

FCDobbs 01-30-2009 06:36 PM

Paul, thanks for the hint.

At least now, I will only have 7 days stored.

And I won't have to use the script I built.

JonUrban 01-30-2009 08:40 PM

Thanks Paul M! I just installed and ran a 'run now" and it worked like a champ! Very nice! Marked as installed and nominated.

Yonatan 02-06-2009 11:38 AM

Quote:

Originally Posted by Phaedrus (Post 1729297)
Check inside the folders.

I was check.
the folders is empty :(

BlackJacket 02-06-2009 03:28 PM

where do i create the "backups" folder? Which directory?

Yonatan 02-09-2009 09:39 PM

Quote:

Originally Posted by NittoMOD (Post 1736213)
where do i create the "backups" folder? Which directory?

In public_html


- - - - - - - - -

Paul.
Pleash help me, in my problem.
Thanks,
yonatan


All times are GMT. The time now is 07:25 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.01309 seconds
  • Memory Usage 1,740KB
  • 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
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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