Backup not working on ispconfig 3.1.3 and 3.1.4

Discussion in 'Installation/Configuration' started by byman64, Jun 25, 2017.

  1. byman64

    byman64 New Member

    I have 2 servers with ispconfig, I am trying to use the panel feature for backup. Easy to configure. I also read the manual but nothing to add, this feature is really easy to use.
    I checked the folder and time in the backup in server config, then I configured a daily backup for some sites.
    Nothing happen and I dont know what I can check to fix the problem.
    I read some logs but nothing helped me
    What I can check? Any idea?
    thanks
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    ensure that you have the linux zip and sudo packages installed.
     
  3. byman64

    byman64 New Member

    I installed ISP config on ubuntu 16.04 using the guide "the perfect server"
    Zip and sudo seem installed,

    What I can check? Logs? Which one?


    reply from ZIP AND SUDO command
    root@vps01:~# zip
    Copyright (c) 1990-2008 Info-ZIP - Type 'zip "-L"' for software license.
    Zip 3.0 (July 5th 2008). 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 OS 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
    -e encrypt -n don't compress these suffixes
    -h2 show more help

    root@vps01:~# sudo
    usage: sudo -h | -K | -k | -V
    usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user]
    usage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user]
    [command]
    usage: sudo [-AbEHknPS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
    prompt] [-u user] [VAR=value] [-i|-s] [<command>]
    usage: sudo -e [-AknS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
    prompt] [-u user] file ...
     
  4. byman64

    byman64 New Member

    Can I run manually the site backup?
    I would like is any error appear...I am reading the file 500-backup.inc.php I could add some line to debug it, but I dont know how run the backup from command line...
     
  5. byman64

    byman64 New Member

    update:
    I just tried to change the server config
    FROM
    Backup all files in web directory as root user
    TO
    Backup web files owned by web user as zip
    and now the backup seems works fine.
    So the mystery is why as root user backups do not working.
    I would like investigate with your help, if you agree. But I need the instructions to run backup from command line and see if any error appear.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPConfig cron plugins like the backup function can be run manually like this:

    /usr/local/ispconfig/server/cron_debug.php --cronjob=500-backup.inc.php
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Sorry, wrong command. Please use:

    php /usr/local/ispconfig/server/cron_debug.php --cronjob=500-backup.inc.php
     
  8. byman64

    byman64 New Member

    I changed the backup type as " Backup all files in web directory as root user" and from CLI Root backup works like a charm.

    why they didnt run at scheduled time?
    I am going to change the date time to force a backup at 1.00 pm
    I will revert you soon
     
  9. byman64

    byman64 New Member

    Using the command line with the option "Backup all files in web directory as root use" backup works fine...as said I tried again to schedule backup at 1.00pm but nothing happen and I dont know what I can check.
    We need a log to know if script was executed, of if a filter skipped the domain.
    In the ispconfig panel I don't see any log for backup, just stats.
    A log with basic info would be always useful, something like:
    - Started backup at ...
    - selected n records
    - backup of domain..
    - Finish backup at
    I am not the best php developer but I am able to read and write php code, if you dont have other stuff to check I can try to add some lines into 500-backup.inc.php to write a log and try to debug the issue. Let me know.
     
  10. nopnop59

    nopnop59 New Member

    same probleme for me
    it seems that DB backup doesn't worK . any idea please ?
     
  11. byman64

    byman64 New Member

    I created my own script, but checked my config and wow...backup are working now!
    Dont know why!
    Here the current settings:
    System->Server Config
    • Backup directory: /home/backup/ispconfig
    • backup directory is a mount: not selected
    • Backup mode: backup web files owned by web user as zip
    • Backup time: 23:15h

    Sites->yoursite.com
    • your fav interval
    note about the current version: ISPConfig Version: 3.1.5
     
  12. nikolaosp

    nikolaosp Member

    I hope that it is not a huge problem to hijack this thread.

    I have a very similar problem, some of the folders that are created through the backup process are correct where other folders have some sql files or some zip files. When I run the command that Till mentioned above it gives me
    errors.

    Any ideas?
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you run the command as root user?
     
  14. nikolaosp

    nikolaosp Member

    I run the command as user root.
    I also have issues with the backup procedure from the panel itself. Some clients appear to be backuped correctly where other clients only get their sql databases backuped and not the files or vice versa.
     
  15. neutrinohu

    neutrinohu New Member

    Is that normal only the databases have backup?
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    The backup contains the database and website data.
     
  17. neutrinohu

    neutrinohu New Member


    Unfortunately they are not...

    :/www/backup/web9# ll
    total 1544
    drwxr-x--- 2 root root 4096 Sep 9 10:10 ./
    drwxr-x--- 7 root root 4096 Aug 15 00:02 ../
    -rwxr-x--- 1 root root 522884 Sep 8 00:02 db_bpflower_2019-09-08_00-02.sql.gz*
    -rwxr-x--- 1 root root 522882 Sep 9 00:02 db_bpflower_2019-09-09_00-02.sql.gz*
    -rwxr-x--- 1 root root 522916 Sep 9 10:10 db_bpflower_2019-09-09_10-10.sql.gz*

    upload_2019-9-9_10-37-58.png
     
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    ensure that you updated to 3.1.15 and then wait a day and check again.
     
  19. neutrinohu

    neutrinohu New Member


    I am at 3.1.15 and it was never worked well. I've made a manual backup with "php /usr/local/ispconfig/server/cron_debug.php --cronjob=500-backup.inc.php", but that file is not contains the website files too...
     
  20. till

    till Super Moderator Staff Member ISPConfig Developer

    The website backup and database backup are two different files. If the website backup can not be created on your server, then it might be that some programs are missing on your system that are required by the backup function. You must have sudo, tar and zip command installed.
     

Share This Page