Re: [PHP-DB] Database Backup

2004-10-06 Thread Aaron Todd
Andrew,

I like the idea of using the crontab even though I have never used it 
before.  I guess the first thing I need to do is make my script.  Thanks for 
the link to mysqldump, I think it will be usefull.  Do you happen to know 
how I might be able to push a file to another server using FTP?  Just 
playing around the past few days I have created a script that will get the 
contents of the table and bring up a download window so I can download it 
into an Excel file.  It doesnt use mysqldump, but it works.  But I need it 
to send the file to my FTP server automaticly.  Any suggestions??

Thanks,

Aaron


Andrew Kreps [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 On Tue, 5 Oct 2004 16:33:08 -0400, Aaron Todd [EMAIL PROTECTED] 
 wrote:
 What is everyone doing to backup a MySQL database.  Just in case...I'd 
 like
 to backup mine, but I was wondering if there was a way to do it without
 going to a page and clicking a button.  Is there a way to run a php 
 script
 on a time schedule and then push a backup file to an FTP server or
 something.  Anyone out there doing anything like this?

 Personally, I go straight to the source.

 http://dev.mysql.com/doc/mysql/en/mysqldump.html

 You can write a PHP script that runs the dump, compresses the file and
 FTP's the file anywhere you like.  As Martin mentioned, You can run
 this PHP script from your crontab or Task Scheduler by invoking the
 interpreter from the command line, i.e. '/usr/local/bin/php
 /home/mydir/scripts/backupDB.php'.
 



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Database Backup

2004-10-06 Thread Andrew Kreps
On Wed, 6 Oct 2004 15:31:34 -0400, Aaron Todd [EMAIL PROTECTED] wrote:
  Do you happen to know
 how I might be able to push a file to another server using FTP?

I might http://us4.php.net/ftp  has a list of all the FTP related
PHP functions with some ready-to-use examples.  Enjoy!

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Database Backup

2004-10-05 Thread Aaron Todd
What is everyone doing to backup a MySQL database.  Just in case...I'd like 
to backup mine, but I was wondering if there was a way to do it without 
going to a page and clicking a button.  Is there a way to run a php script 
on a time schedule and then push a backup file to an FTP server or 
something.  Anyone out there doing anything like this?

Thanks,

Aaron 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Database Backup

2004-10-05 Thread martin73
You can simply copy files from 'data' subfolder of mysql database or
create php script to make a dump of db and run it on regular basis as a
cron job.

Cheers,
Martin

 What is everyone doing to backup a MySQL database.  Just in case...I'd
 like
 to backup mine, but I was wondering if there was a way to do it without
 going to a page and clicking a button.  Is there a way to run a php script
 on a time schedule and then push a backup file to an FTP server or
 something.  Anyone out there doing anything like this?

 Thanks,

 Aaron

 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Database Backup

2004-10-05 Thread Andrew Kreps
On Tue, 5 Oct 2004 16:33:08 -0400, Aaron Todd [EMAIL PROTECTED] wrote:
 What is everyone doing to backup a MySQL database.  Just in case...I'd like
 to backup mine, but I was wondering if there was a way to do it without
 going to a page and clicking a button.  Is there a way to run a php script
 on a time schedule and then push a backup file to an FTP server or
 something.  Anyone out there doing anything like this?

Personally, I go straight to the source.  

http://dev.mysql.com/doc/mysql/en/mysqldump.html

You can write a PHP script that runs the dump, compresses the file and
FTP's the file anywhere you like.  As Martin mentioned, You can run
this PHP script from your crontab or Task Scheduler by invoking the
interpreter from the command line, i.e. '/usr/local/bin/php
/home/mydir/scripts/backupDB.php'.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Database backup

2003-08-27 Thread John W. Holmes
Chris Payne wrote:

Hi there everyone,

Is there a quick way I can backup all my databases on Linux so I can download them to my HD/Burn them onto CD?

I've started a very large travel project and there is going to be over 100 DB's in the end, each with who knows how many tables and going through PHPMyADMIN and exporting 1 DB at a time is going to take forever.

My Server is the Rehat Linux 8.0 with Apache and MySQL and PHP.

Thanks, any help would be really appreciated (And save me alot of headaches).
Quickest way is to shut down MySQL and just copy the data directory. 
Then restart MySQL.

Or you can use mysqldump with the --all-databases flag.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals  www.phparch.com

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Database backup

2003-08-27 Thread ramki
mysqldump -A  /path_to_file/filename.sql

for eg:  mysqldump -A  /tmp/alldatabases.sql

This generates a sql file which can be used as backup or  for restore...

Hope it helps..

-ramki

Chris Payne wrote:

Hi there everyone,

Is there a quick way I can backup all my databases on Linux so I can download them to my HD/Burn them onto CD?

I've started a very large travel project and there is going to be over 100 DB's in the end, each with who knows how many tables and going through PHPMyADMIN and exporting 1 DB at a time is going to take forever.

My Server is the Rehat Linux 8.0 with Apache and MySQL and PHP.

Thanks, any help would be really appreciated (And save me alot of headaches).

Chris
 

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Database backup

2003-08-27 Thread otherguy
http://www.mysql.com/doc/en/Backup.html

This question might be a little bit more relevant on the mySQL-help 
list... At the very least, if that page doesn't do it for you, you 
might be able to get a little bit more expertise about backups of very 
large installations there.

-Cameron Wilhelm

On Tuesday, August 26, 2003, at 03:46  PM, Chris Payne wrote:

Hi there everyone,

Is there a quick way I can backup all my databases on Linux so I can 
download them to my HD/Burn them onto CD?

I've started a very large travel project and there is going to be over 
100 DB's in the end, each with who knows how many tables and going 
through PHPMyADMIN and exporting 1 DB at a time is going to take 
forever.

My Server is the Rehat Linux 8.0 with Apache and MySQL and PHP.

Thanks, any help would be really appreciated (And save me alot of 
headaches).

Chris
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Database backup

2003-08-27 Thread Jacob A. van Zanen
How'bout backing up your data directory (ies)

Otherwise you can maybe use mysql_dump in a batch??


Jack



-Original Message-
From: Chris Payne [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 26, 2003 11:46 PM
To: php
Subject: [PHP-DB] Database backup


Hi there everyone,

Is there a quick way I can backup all my databases on Linux so I can
download them to my HD/Burn them onto CD?

I've started a very large travel project and there is going to be over
100 DB's in the end, each with who knows how many tables and going
through PHPMyADMIN and exporting 1 DB at a time is going to take
forever.

My Server is the Rehat Linux 8.0 with Apache and MySQL and PHP.

Thanks, any help would be really appreciated (And save me alot of
headaches).

Chris

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Database backup

2003-08-27 Thread jeffrey_n_Dyke

use mysqldump.  you can dump all databases (--all-databases) or list them
individually.

http://www.mysql.com/doc/en/mysqldump.html

hth
Jeff


   
 
  Chris Payne
 
  [EMAIL PROTECTED]To:   php [EMAIL PROTECTED]
   
  ene.com cc: 
 
   Subject:  [PHP-DB] Database backup  
 
  08/26/2003 05:46 
 
  PM   
 
   
 
   
 




Hi there everyone,

Is there a quick way I can backup all my databases on Linux so I can
download them to my HD/Burn them onto CD?

I've started a very large travel project and there is going to be over 100
DB's in the end, each with who knows how many tables and going through
PHPMyADMIN and exporting 1 DB at a time is going to take forever.

My Server is the Rehat Linux 8.0 with Apache and MySQL and PHP.

Thanks, any help would be really appreciated (And save me alot of
headaches).

Chris

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Database backup

2003-08-27 Thread David Smith
Just do a mysqldump on the command line. It will dump a whole bunch of 
SQL code that can be used to recreate the database in the event of 
disaster. You could even pipe the output to gzip to compress it.

   mysqldump --all-databases -u root | gzip -c  mysql_backup.gz

That works fine for me. Then just do this to restore the database from 
backup:

   gunzip mysql_backup.gz
   mysql -u root  mysql_backup
I recommend putting this in a shell script cron job that stores each 
backup with the date in the file name.

Enjoy.

--Dave

Chris Payne wrote:

Hi there everyone,

Is there a quick way I can backup all my databases on Linux so I can download them to my HD/Burn them onto CD?

I've started a very large travel project and there is going to be over 100 DB's in the end, each with who knows how many tables and going through PHPMyADMIN and exporting 1 DB at a time is going to take forever.

My Server is the Rehat Linux 8.0 with Apache and MySQL and PHP.

Thanks, any help would be really appreciated (And save me alot of headaches).

Chris
 

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php