How do I enable automatic backup?

Discussion in 'Installation/Configuration' started by drsintoma, Mar 1, 2006.

  1. drsintoma

    drsintoma New Member

    Hi everyone.

    That's it. How do I enable and configure automatic backup? I've been searching around and can't find anything.
  2. falko

    falko Super Moderator

  3. drsintoma

    drsintoma New Member

    Thanks, I know about backup tools. But I was talking about the backup that appears in the changelog (2.1.2).


    - Added module for client and reseller invoices.
    - Added slowenian error pages.
    - Added automatic backup script for all customers.
    - Improved update manager.
    - Updated swedish, french and italian language files.
    - Bugfix: Missing module error in WebFTP is fixed.
  4. till

    till Super Moderator

    The backup runs automatically and stores a tar.gz backup file in the "backup" directory of each website.

    If you dont have a backup directory in the website directories, please check if this line is in your root crontab:

    05 02 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/backup.php &> /dev/null
  5. drsintoma

    drsintoma New Member

    Now everything make sense. Thanks. :rolleyes:
  6. dumb-medic

    dumb-medic New Member


    i have this line

    05 02 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/backup.php &> /dev/null
    in the crontab, but no backup-folders.
    what can be wrong?

  7. falko

    falko Super Moderator

    What happens if you run this command:
    /root/ispconfig/php/php /root/ispconfig/scripts/shell/backup.php
    on the shell (as root)?
  8. dumb-medic

    dumb-medic New Member

    simply nothing, bash prompt.
    in /var/log/messages no entry :confused:
    and again no backup-folders.
    Last edited: Apr 25, 2006
  9. till

    till Super Moderator

    The bash prompt returns without errors? How long does it take until the prompt returns?
  10. dumb-medic

    dumb-medic New Member

    hitting enter brings the prompt, same second.
    Last edited: Apr 26, 2006
  11. falko

    falko Super Moderator

    Please set $go_info["server"]["do_automated_backups"] to 1 in /home/admispconfig/ispconfig/lib/
  12. dumb-medic

    dumb-medic New Member


    that did it, was set to 0.

    dropped the crontab-line on bash as root again, all backup-folders including zips are made.

    thanks falko, thanks till!
  13. chrno

    chrno New Member

    thanks for the info!

    How often will this run? daily? I'll have to backup bind and apache files too right for complete backup?
  14. till

    till Super Moderator

    The backup is only for the content of the websites. You will have to backup your configuration files and the ISPconfig database separately.
  15. SupuS

    SupuS HowtoForge Supporter


    Automatic backups didn't work for me. In crontab I have appropriate line and in my /home/admispconfig/ispconfig/lib/ I set up backups to 1 and wait for couple days .. and nothing .. in backups directory is only one backup which I created by

    /root/ispconfig/php/php /root/ispconfig/scripts/shell/backup.php
    and in /var/log/messages or /var/log/syslog no error ... :confused:

    This problem I had in previous version of ISPconfig and after upgrade to latest version it remains ..

    any idea?
  16. falko

    falko Super Moderator

    What do you see when you run
    /home/admispconfig/ispconfig/tools/zip/zip -h
    ? Maybe there's a problem with zip...
  17. SupuS

    SupuS HowtoForge Supporter

    Output of this command is

    # /home/admispconfig/ispconfig/tools/zip/zip -h
    Copyright (C) 1990-1999 Info-ZIP
    Type 'zip "-L"' for software license.
    Zip 2.3 (November 29th 1999). Usage:
    zip [-options] [-b path] [-t mmddyyyy] [-n suffixes] [zipfile list] [-xi list]
      The default action is to add or replace zipfile entries from list, which
      can include the special name - to compress standard input.
      If zipfile and list are omitted, zip compresses stdin to stdout.
      -f   freshen: only changed files  -u   update: only changed or new files
      -d   delete entries in zipfile    -m   move into zipfile (delete files)
      -r   recurse into directories     -j   junk (don't record) directory names
      -0   store only                   -l   convert LF to CR LF (-ll CR LF to LF)
      -1   compress faster              -9   compress better
      -q   quiet operation              -v   verbose operation/print version info
      -c   add one-line comments        -z   add zipfile comment
      -@   read names from stdin        -o   make zipfile as old as latest entry
      -x   exclude the following names  -i   include only the following names
      -F   fix zipfile (-FF try harder) -D   do not add directory entries
      -A   adjust self-extracting exe   -J   junk zipfile prefix (unzipsfx)
      -T   test zipfile integrity       -X   eXclude eXtra file attributes
      -y   store symbolic links as the link instead of the referenced file
      -R   PKZIP recursion (see manual)
      -h   show this help               -n   don't compress these suffixes
  18. till

    till Super Moderator

    If the backup works if you run:

    /root/ispconfig/php/php /root/ispconfig/scripts/shell/backup.php

    then I guess you have a cron error. Please check your root crontab at which time the backup script is executed and then have a look at your syslog if you get cron errors in this time period.
  19. SupuS

    SupuS HowtoForge Supporter

    If I execute backup manualy I get:

    # /root/ispconfig/php/php /root/ispconfig/scripts/shell/backup.php
            zip warning: name not matched: *
    zip error: Nothing to do! (try: zip -ry /home/admispconfig/ispconfig/temp/f5deba956ee428ec03ec9615467911f0/ . -i *)
            zip warning: name not matched: *
    zip error: Nothing to do! (try: zip -ry /home/admispconfig/ispconfig/temp/305da47d27d13c7f5513be666ecacd54/ . -i *)
            zip warning: name not matched: *
    zip error: Nothing to do! (try: zip -ry /home/admispconfig/ispconfig/temp/928c37c9776f9da3cb088a6102ec8c99/ . -i *)
            zip warning: name not matched: *
    zip error: Nothing to do! (try: zip -ry /home/admispconfig/ispconfig/temp/a3d95fc162fdccff67dbd5f34b64b2c1/ . -i *)
    These webs has not any data yet. I don't know if it is fatal error or not but I have backup files in backup dirs and in backup.php is -ry (I have latest version of ISPConfig). In syslog is not any line with *CRON* or *backup* in a defined time.

    I tried change crontab line to

    05 02 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/backup.php &> /root/backup.txt
    but in my root directory is not any new file .. what is wrong? :(

    my crontab:

    # crontab -l
    30 00 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/logs.php &> /dev/null
    59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/ftp_logs.php &> /dev/null
    59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/mail_logs.php &> /dev/null
    59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/cleanup.php &> /dev/null
    0 4 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php &> /dev/null
    0,30 * * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/check_services.php &> /dev/null
    15 3,15 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/quota_msg.php &> /dev/null
    40 00 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/traffic.php &> /dev/null
    05 02 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/backup.php &> /dev/null
    Last edited: Jul 24, 2006
  20. till

    till Super Moderator

    The backups where not stored in your root directory, they where stored in the backup directory of the website.

Share This Page