Jump to content

Backup Schedule?


kjarrett

Recommended Posts

Hi KJ,

 

From the Help site page:

But remember, these backups are for emergencies, it is always each and everyones responsibility to make our own backups.

 

Thanks Tom. I was asked by our network admin if there was a way to automate the process on our end using FTP. Any thoughts on that? Possible? Or not worth the trouble?

 

TIA,

 

-kj-

Link to comment
Share on other sites

What are you wanting to back up? The entire site? Databases?

 

You can backup your databases using a script called dbsender and have them emailed or FTP'd to you.

 

Sorry for being unclear, thought I'd specified that, clearly didn't - that's EXACTLY what I need ... how do we make this happen? Thanks a ton!

 

-kj-

Link to comment
Share on other sites

Can I just say that those forum threads make it sound really complicated and difficult. (I haven't done this yet because it just sounds so hard.)

 

I'd love it if somebody wanted to write a tutorial on this. I imagine it would be widely used.

 

I'd be willing to lend a hand. But I'm not exactly sure how to get started...

Link to comment
Share on other sites

The dbsender script is documented on what needs to be changed. If you have problems start a thread and ask for help. I backup 4 databases every night and have them emailed to a special address.

 

Here is a quick rundown of what you need to do.

  1. Create a folder at the same level as your public_html folder in your web space - call it what ever you like
  2. Change the permissions of the folder you just created 770
  3. Edit the dbsender script (see details below) and place it in this folder - if more than one file is to be backed up rename the script file - one script file required per file
  4. Set up a cron job to run the script

Edit this section of the dbsender script for your use I've bolded what you need to edit for email:

// configure your database variables below:

$dbhost = 'localhost'; // Server address of your MySQL Server

$dbuser = 'your-cPanel-name_database-user'; // Username to access MySQL database

$dbpass = 'password-for-database'; // Password to access MySQL database

$dbname = 'your-cPanel-name_database-name'; // Database Name

 

// Optional Options You May Optionally Configure

 

$use_gzip = "yes"; // Set to No if you don't want the files sent in .gz format

$remove_sql_file = "yes"; // Set this to yes if you want to remove the .sql file after gzipping. Yes is recommended.

$remove_gzip_file = "no"; // Set this to yes if you want to delete the gzip file also. I recommend leaving it to "no"

 

// Configure the path that this script resides on your server.

 

$savepath = "/home/your-cPanel-name/folder-you-create"; // Full path to this directory. Do not use trailing slash!

 

$send_email = "yes"; // Do you want this database backup sent to your email? Fill out the next 2 lines

$to = "who-to-email@yourTCHdomain.com"; // Who to send the emails to

$from = "backup@yourTCHdomain.com"; // Who should the emails be sent from?

 

$senddate = date("j F Y");

 

$subject = "Your message subject - $senddate"; // Subject in the email to be sent.

$message = "Your MySQL database has been backed up and is attached to this email"; // Brief Message.

 

 

$use_ftp = "no"; // Do you want this database backup uploaded to an ftp server? Fill out the next 4 lines

$ftp_server = "localhost"; // FTP hostname

$ftp_user_name = "ftp_username"; // FTP username

$ftp_user_pass = "ftp_password"; // FTP password

$ftp_path = "/"; // This is the path to upload on your ftp server!

 

A sample cron job entry would look like this:

>/usr/bin/php -q /home/your-cPanel-name/folder-you-created/script-name-to run

Link to comment
Share on other sites

  • 3 months later...
What are you wanting to back up? The entire site? Databases?

 

You can backup your databases using a script called dbsender and have them emailed or FTP'd to you.

Does anyone know of scripts/programs that will backup the entire site and have it emailed or FTP'd to you?

Thanks.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...