Loading ...
Sorry, an error occurred while loading the content.

Re: [phpXperts] Dumping DB...

Expand Messages
  • Bipool
    You can use mysqldump command in exec() function Hope this will work. Thanks Bipool
    Message 1 of 6 , Jan 3, 2008
    • 0 Attachment
      You can use mysqldump command in exec() function
      Hope this will work.

      Thanks
      Bipool


      On Jan 4, 2008 9:27 AM, <todmin_2000@...
      > wrote:

      So you want to backup of mysql into a file on your hosting server then
      wipe the DB clean, right??



      Mynul Islam wrote:
      > Dear Xperts,
      >
      > I need to dump mysql db with php coding, i.e. with php scripting.
      > Please some one help! I don't want to use phpmyadmin or something like
      > that.
      >
      > it will work something like -when i run the script it will dump the
      > DB into my hosting space.
      >
      > Please .... extend your ideas!
      >
      > Thanx.
      >
      >
      >
      > Visit phpXperts website at www.phpxperts.com
      > Yahoo! Groups Links
      >
      >
      >
      >
      >


    • todmin_2000@yahoo.com
      Question Bipool, won t that dump the DB without a backup copy?? I think if I understand him correctly he wants it dumped into a backup file on the server??
      Message 2 of 6 , Jan 3, 2008
      • 0 Attachment
        Question Bipool, won't that dump the DB without a backup copy??

        I think if I understand him correctly he wants it dumped into a backup file on the server??




        Bipool wrote:

        You can use mysqldump command in exec() function
        Hope this will work.

        Thanks
        Bipool


        On Jan 4, 2008 9:27 AM, <todmin_2000@... > wrote:

        So you want to backup of mysql into a file on your hosting server then
        wipe the DB clean, right??



        Mynul Islam wrote:
        > Dear Xperts,
        >
        > I need to dump mysql db with php coding, i.e. with php scripting.
        > Please some one help! I don't want to use phpmyadmin or something like
        > that.
        >
        > it will work something like -when i run the script it will dump the
        > DB into my hosting space.
        >
        > Please .... extend your ideas!
        >
        > Thanx.
        >
        >
        >
        > Visit phpXperts website at www.phpxperts.com
        > Yahoo! Groups Links
        >
        >
        >
        >
        >



      • Satya Vem
        Hi Mynul, I think the following code works for you. <?php $backupFile = $dbname . date( Y-m-d-H-i-s ) . .gz ; $command = mysqldump --opt -h $dbhost -u
        Message 3 of 6 , Jan 4, 2008
        • 0 Attachment

          Hi Mynul,

          I think the following code works for you.



           <?php
          $backupFile = $dbname . date("Y-m-d-H-i-s") . '.gz';
          $command = "mysqldump --opt -h $dbhost -u $dbuser -p $dbpass $dbname | gzip > $backupFile";
          system($command);
          ?>






          Posted through Grouply, the better way to access your Yahoo Groups like this one. Check out Grouply here.

        Your message has been successfully submitted and would be delivered to recipients shortly.