Simplify Backups?

Started by MatthewSchenker, March 13, 2008, 07:16:50 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MatthewSchenker

#15
Jason,
That all makes sense now, and the backups are working!  Thanks for the help!

OK, one last question.  Why is there such a huge difference between the file sizes when doing a manual "full backup" and doing an automatic backup?

Automatic backup using a cron job (total of both my SMF sites): 38,634,153
Manual "full backup" of my domain from "backup" in cPanel: 423,891,669

That's like a difference of 11X!  Not only that, but the cron output is an sql file, and the "full" backup is a tar.gz file!!

Matthew

Jason

Each cron job is just a database backup.  The full backup is everything in your account (including the databases).

MatthewSchenker

Quote from: Jason on March 23, 2008, 08:12:51 AM
Each cron job is just a database backup.  The full backup is everything in your account (including the databases).

OK, that makes sense.  So if I had an emergency and my forum database was wrecked, I could restore it with the back up from the cron job, right?
Matthew

Finner

Quote from: MatthewSchenker on March 23, 2008, 08:21:02 AM
Quote from: Jason on March 23, 2008, 08:12:51 AM
Each cron job is just a database backup.  The full backup is everything in your account (including the databases).

OK, that makes sense.  So if I had an emergency and my forum database was wrecked, I could restore it with the back up from the cron job, right?
Matthew

Yup

Steve

Quote from: Jason on March 14, 2008, 02:52:23 PM


2.  I setup a cron job to automatically backup my databases daily to a folder in my account (outside of public_html).  That assures you of having a backup to restore if something breaks one day without the loss of too much data.


Jason, can i keep the last three backup databases in the backups directory? What is the code for this?

Jason

I'm not aware of how you can do that in a cron command.  You'd need to have a script setup for something like that.

However, you could add separate cron jobs to accomplish this.  For example, you could create a cron job that backs up the database to one file on Monday, Wed and Fridays.  Then you could create a separate cron job that creates a backup of your database on the other days to a separate file.  You could create a separate cron for each day of the week if you really wanted to although that would use a good bit of your account space.

Steve


Steve

Is it possible to restore a database of 35 MB via CPanel?
or to restore my directory that is about 235MB via CPanel?

Jason

Are you talking about using phpmyadmin or using the actual cpanel backup/restore icon?  I've never restored a database through that part of the site though if it was created there it should work in theory.  That runs the command vs. using phpmyadmin (web-based) so it probably would be more successful.

Steve

A database of 35 MB is relatively big, i wonder if the script times out during the restoration.

Bootleg

Hi Steve, have you considered using the phpmysqladmin query dialog to run the mysql command "load data infile"?

Jason

Quote from: Steve on August 24, 2008, 12:35:38 AM
A database of 35 MB is relatively big, i wonder if the script times out during the restoration.

It depends on how you're doing it.  However, I just looked in cPanel and RVSkin's word choice on the backup page is a bit misleading.

The button that should say "full backup" actually says "databases."  I was hoping there was an option to create a real-time backup and then restore it all without having to use a copy from your local pc.  Because if you have to browse to grab the file from your local pc, you'll likely timeout.

I would go the route of shell when your database(s) get to that size.  Much easier.

Or, you could export and import by tables instead of doing the whole db at once.  Of course, that can be a bit of a hassle and takes much more time than just uploading the db and restoring it from shell.

Steve

QuoteI would go the route of shell when your database(s) get to that size.  Much easier.

Does this option available via CPanel? I think that we don't have this authority for security reasons.

Jason

No, it's granted upon special request. 

Steve

What is the best way for backup

To use the 'full backup' via Cpanel or to transfer the directories of my account via ftp to my local pc?

Are these methods have the same result?