Finding out the reason for the failed backup

Discussion in 'Installation/Configuration' started by Emsanator, Jan 5, 2022.

Tags:
  1. Emsanator

    Emsanator Member

    Hello,

    With the planned backup, a backup of the database was created, but unfortunately, the backup of the files could not be created. I then ran the backup manually but got the error again.

    How can I find out the reason for this, is a detailed log kept for this?

    upload_2022-1-6_0-41-4.png

    Thank you.
     
  2. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    you should be able to use this script to run a backup manually from the cli.
    /usr/local/ispconfig/server/lib/classes/cron.d/500-backup.inc.php
    it's been a long time since i've used it, i can't remember if it needs any arguments or not.

    or /usr/local/ispconfig/server/backup-now.php
    Usage:
    php backup-now.php --id=<4> [--type=<all>]
    Options:
    --id id of the website to backup.
    --type backup type: all, web or mysql. Default is all.
     
  3. Emsanator

    Emsanator Member

    Thank you for your time, I did as you mentioned, below is the console result. Do you think there could be a problem as stated in this question?

    Code:
    root@serve:~# php /usr/local/ispconfig/server/backup-now.php --id=2
    Making backup of website id=2, type=all, please wait...
    zip warning: No such device or address
    zip warning: No such device or address
    07.01.2022-19:08 - ERROR - Backup of web files for domain example.com failed using path /var/www/clients/client2/web2 failed.
    All operations finished, status success.
    root@serve:~#
    
     
    Last edited: Jan 11, 2022
  4. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    unless you've changed the backup script then i doubt it's the same issue. the default script works on too many other systems to be something like that, plus i would expect the db backup to have the same problem.

    what OS is it? version?
    is it a single server or multi-server ispconfig?
    if multi-server, are the databases and websites on the same server?
    have you changed the backup folders from the default /var/backup?
    is the backup folder on the same disk as the web files? the db files? is it a local mount? a remote mount?

    maybe you can look through /usr/local/ispconfig/server/lib/classes/backup.inc.php and find out exactly what command is being run to execute the web files backup and try running that manually from the cli, that might show more details about what's going wrong.
     
  5. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Try enabling server debugging and run the backup again; the zip command (line 1009 or 1012) should be logged, as it's run via exec_safe.
     
    nhybgtvfr likes this.
  6. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    or do what @Jesse Norell says. would be easier. dunno why, i always completely forget about ispconfig's debug mode setting. :oops:
     
    ahrasis likes this.
  7. Emsanator

    Emsanator Member

    Debian 10
    Single server
    No, I didn't change the backup folder
    Yes, the same disk
    --
    There is no problem in backing up 3-5 GB websites, but some sites use 15 GB or more. The temporary ZIP file, where backups of websites using high GB space are created, usually reaches 11-12 GB, and the backup process results in an error. There is no problem with small-sized sites. I think it's a problem in backing up large sites.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    You should consider switching backup mode from zip to tar.gz, which is more suitable for website backups anyway as it preserves file permissions which zip is not capable of.
     
    Emsanator likes this.
  9. Emsanator

    Emsanator Member

    Several large sites were backed up without any problems. I downloaded the backups to my computer and opened it, everything is flawless. I thank you and other valuable people for your interest.
     

Share This Page