Announcement

Collapse
No announcement yet.

Script Wanted

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Script Wanted

    A PHP Script to execute this command


    mysql -uUSERNAME -p newdbname < /path/to/dump.sql

  • #2
    If you need to execute it only once. Use SSH, or if you don't have a SSH account, use Telnet.

    If you need this to run every X, then throw that into a cron job.

    Comment


    • #3
      you can put it in PHP using

      PHP Code:
      <? exec("mysql -uUSERNAME -p newdbname < /path/to/dump.sql"); ?>

      Comment


      • #4
        The problem is that any PHP script will suffer the same disadvantage as the backup option in the Admin CP - namely it is subject to PHP timeout issues. As I've explained before the only reliable method for backing up is with shell access via telnet/ssh. Any script will be inherently unreliable.
        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
        Change CKEditor Colors to Match Style (for 4.1.4 and above)

        Steve Machol Photography


        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


        Comment


        • #5
          Thanx for all the help,,

          In the end I managed to get the host to import the database.

          But I also found that I could access the MYSQL Database remotely, so wont have any problems in future!

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...
          X