If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Dec 2006
    Member #
    Hello everyone. I am trying to back up a database using a php script that is to be executed by task manager. I have found this script:
    PHP Code:
     $backupFile $dbname date("Y-m-d-H-i-s")       . '.gz';
    $command "mysqldump --opt -h $dbhost -u $dbuser -p $dbpass $dbname       | gzip > $backupFile";
    As I am very new to php and mysql I dont really know what I am doing, I understand the above script, But I dint know where the backup is stored and how I would modify the script to put it in a specified path. I would also like to hear other methords how to back up a database, Thanks.


  3. #2
    Senior Member raspberryh's Avatar
    Join Date
    Aug 2004
    Erie, PA
    Member #
    1 times
    To modify the script to put it in a specified path, just modify the [minicode]$backupFile=[/minicode] part...

    Like if you want it to be in "/tmp/", then put
    [minicode]$backupFile = "/tmp/" . $dbname . date("Y-m-d-H-i-s") . '.gz';[/minicode]
    choosy developers choose gif!
    website | paintings | blog

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
All times are GMT -6. The time now is 05:24 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: