Announcement

Collapse
No announcement yet.

How give to user the possibility to make backup using an application from men¨

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

  • How give to user the possibility to make backup using an application from men¨

    Hi all,

    I would like to give the possibility to make a complete database backup to end user making it automatically from a menu item.
    A part from the mySQL commands is there any other ready to use possibility ?
    Many thanks
    Giovannino

  • #2
    for example:

    PHP Code:
    <?php
    // Bitte hier Ihre Daten eintragen
    $host'dbxx.db.1and1.com';
    $user'dbxxxxxx';
    $pass'xxxxxxxx';
    $db'dbxxxxxxx';

    // Befehl ausfŘhren und in Zipfile speichern
    system(sprintf(
    'mysqldump --opt -h%s -u%s -p"%s" %s | gzip > %s/dumpDB.sql.gz',
    $host,
    $user,
    $pass,
    $db,
    getenv('DOCUMENT_ROOT')
    ));
    echo 
    '+DONE';
    ?>
    Best regards: - Reinhard -

    I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

    Comment


    • #3
      Hi RHS,
      many thanks for script.
      I'm wondering if the following variables are stored in somewhere becouse, in my situation, each solution installated is different from others.
      I mean if your solution is sold to different customers each environment is different from others.
      My needing is to have a parametric script that reads these values within active connection directly without a manual input or edit.
      Probably they are global variable but I really do not know how to read them.

      $host= 'dbxx.db.1and1.com';
      $user= 'dbxxxxxx';
      $pass= 'xxxxxxxx';
      $db= 'dbxxxxxxx';

      Comment

      Working...
      X