FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Cron Folder Backup





n0obie4life
Okay..I've done Cron SQL backup every monday. So now, how do I have Cron Folder Backups every month (only 1 folder) ?

Btw, if anyone wants the cron backup for SQl code.

Code:
mysqldump --add-drop-table -u <username> -p<password> <dbname> > phpbb_sql_backup-$(date +1m1d1Y).sql


This backs it up with a file name called phpbb_sql_backup with the date.
boringest
is it possible to create one whereby it'll send the backup file to your email?
n0obie4life
boringest wrote:
is it possible to create one whereby it'll send the backup file to your email?


No idea about that.

But, I know that stores it in the root folder (before public_html). Then sends you an email.
kv
You can add onother php script which sends you the folder zipped as email or ftpd to some server.
charliehk
I guess copy() could be used to copy a file, but how about zip?
n0obie4life
So, no possible way to do it through cron?
foggy
What you need to do in order to accomplish what I think you've been saying is create a PHP script that first backs up the database to a file and then handles to file according to what you want to do (email, FTP) and then moves or deletes the file, depending on what you want.

Now you can research (google) each step of this script separately if you don't know how to get it done, and create one mutant, monster script (or possibly just one that works.)
n0obie4life
** Wears normal FRIHosters Hat **

PHP Scripts Rolling Eyes.

I might be just doing them myself Razz.

** Wears Moderator Hat **

Topic resolved.

Closing.

-close-
Related topics
cron jobs
Cron
Cron Jobs
Cron Job to Backup MySQL Database
Cron jobs - running a php file
How to get backup from server to my computer
404 - public_html folder involved
Backups?
Cron Command
how do I auto backup using cron jobs
Folder permission deny access to backup copy of my harddrive
using cron jobs and scp to automate backups
How to get a php script working under a cron job?
Server for Backup
This topic is locked: you cannot edit posts or make replies.    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.