The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Backups fail to complete

Discussion in 'Data Protection' started by vespera, Apr 28, 2014.

  1. vespera

    vespera Member

    Joined:
    Apr 28, 2014
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I'm new on the forum, but it seems that I'm having the same problem on my VPS - since the 8th of April on every attempt to run automatic backup I'm getting an error. Every time I receive one e-mail which states "see the attached log..." - but the attached log file is empty, and the other message "The backup was not able to be completed because it timed out waiting for /scripts/cpbackup to finish".
    I'm still learning how to administer my VPS, and I don't know how to fix this, although I've read the explanation about "the issue was related to the NFS mount itself."
    The "Mount backup drive as needed" was disabled, the backups are stored in Home/backup, and copied to an FTP (when I validate the FTP connection it returns OK).
    I don't have any log files in [Home]/usr/local/cpanel/logs/cpbackup after the 7th of April. The last entry in the cpbackup_transporter.log is from the same date. On the other hand, it seems that I can manually backup an account from it's cPanel without any problems. I have CENTOS 6.5 x86_64 kvm – host with WHM 11.42.1 (build 12).
    Can somebody help me fix this issue, because it's a real problem not being able to create automatic backups.
    Thank's in advance
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Are you using the new backup system or the legacy backup system? Are you able to force a generation of backups?

    Force a generation of backups on the legacy system:

    Code:
    /usr/local/cpanel/scripts/cpbackup --force
    For a generation of backups on the new backup system:

    Code:
    /usr/local/cpanel/bin/backup --force
    Thank you.
     
  3. vespera

    vespera Member

    Joined:
    Apr 28, 2014
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I'm using the new backup, and yes, I can create a manual backup (SSH) for any of my accounts.
    At present, I have in WHM selected to backup just 2 simple sites (both under 200 MB), and one "heavy" site (full cPanel backup of this site results in about 3,3 GB tar.gz file) - Maybe this one could be the one causing problems, (but it wasn't until the 8th of April)?
    Even the Full backup or Home dir backup inside the cPanel of this site completes the process without errors, although it takes some time to complete.
    In WHM I've set up the new backup to run at 3 AM (in the Configure cPanel Cron jobs), and to create a compressed backup every day of the week and twice a month, retaining 3 daily and 2 monthly backups. I'm backing up Access Logs, Bandwidth Data, Local DNS enabled, Backup System files enabled, and Databases Per account and entire MySQL to default backup directory (/backup) and Retain backups enabled (I have enough HDD space). Mount backup drive is disabled.
    Searching for some solution, just today I tried to add another FTP server (instead of the one I was using till now) and set the Timeout to 90 - maybe this would make a difference, but I'm not sure, I have to wait and see what happens tonight. Or do you have some other suggestion?
    Thank you.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Using "/usr/local/cpanel/bin/backup --force" is not the same thing as running /scripts/pkgacct to backup the accounts manually. To clarify, when you say backups work when generated manually, do you mean with "/usr/local/cpanel/bin/backup --force" or with "/scripts/pkgacct"?

    Thank you.
     
  5. vespera

    vespera Member

    Joined:
    Apr 28, 2014
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    You are right, I didn't clarify it, so, here it is:
    - a few days ago I've sucessfully created a backup for this particular account using "/scripts/pkgacct userxy" (so I got a file like "cpmove-userxy.tar.gz")
    Yesterday I've sucessfully created a backup from inside the cPanel for this account, so, by clicking the "Download a Home Directory Backup", and another one a bit later by clicking the "Download or Generate a Full Website Backup".
    And just now I tried to run "/usr/local/cpanel/bin/backup --force". And there was the problem - it reports that another backup process is running. As I understand it, by typing this, as a result I should also get a Pid number xxxx of the process (something like: "Backup process currently running. Pid: 5378", and this way I should be able to stop it by using "kill -9 5378".
    But I didn't get the Pid number, I got this:

    root@host [~]# /usr/local/cpanel/bin/backup --force
    warn [backup] The other backup type is running as evidenced by the existence of:
    /var/cpanel/backuprunning
    info [backup] backup is waiting for the other backup to complete

    I assume this could be the source of my problem - I would say that at some point a backup process started and hasn't finished. But now, how do I identify and kill it? I assume restarting the VPS would help? But I would like to be able to identify and stop it if it happens again...
    Thank you very much
     
  6. vespera

    vespera Member

    Joined:
    Apr 28, 2014
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Just to add up:
    I've restarted my VPS, then I run "/usr/local/cpanel/bin/backup --force", and it seems the backup completed OK.
    Now I have created backup file inside "[Home]/backup/2014-05-01/accounts/userxy.tar.gz" and "[Home]/backup/monthly/2014-05-01/accounts/userxy.tar.gz" - size of both is identical - 3493.8M.
    I also got a normal "Backup sucesfull" log file sent to my email. (If needed I can post it back here)
    So, after this I went to check if my backups were also sent by FTP to my (temporary) FTP storage at ADrive, but they didn't, or at least not yet - I can not tell if they are still being uploaded or not.
    At the moment the directories "2014-05-01/accounts/" and "monthly/2014-05-01/accounts/" have been created at my FTP storage, but the file "userxy.tar.gz" inside "2014-05-01/accounts/" is just 3.5M, and the folder "monthly/2014-05-01/accounts/" is still empty.
    I appologize if I ask too much questions, but is there a way for me to check if the backups are still being uploaded to FTP storage, or did the transfer stop for some reason?
    I found "3859 root 18 0.6 0.0 cpbackup_transporter - Processing next task" in the WHMs Process manager - does it indicate that the FTP upload is still running?
    In the Process Manager I also found:
    "2231 root 0 0.0 0.0 cpsrvd (SSL) - waiting for connections"
    "2253 root 0 0.0 0.0 queueprocd - wait to process a task"
    Can this be related to the backup FTP upload process, and how can I check that?
    Thank you once again
     
  7. cPanelPeter

    cPanelPeter Technical Analyst III
    Staff Member

    Joined:
    Sep 23, 2013
    Messages:
    569
    Likes Received:
    15
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello, no need to apologize.

    It sounds like the files are still being transferred. See if the file size is increasing from the 3.5M. You can also type:

    Code:
    # ps auxfwww | grep backup
    
    Look for cpbackup_transporter and if you see it, then it's still uploading.
    You can also review the log at /usr/local/cpanel/logs/cpbackup_transporter.log
     
  8. vespera

    vespera Member

    Joined:
    Apr 28, 2014
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Just a while ago I received a message: "The following errors occurred while transporting your backup files:
    Unable to send “/backup/2014-05-01/accounts/ronahr.tar.gz” to destination “ADrive FTP” - but I already suspected this, since the file size wasn't changing.

    I run "# ps auxfwww | grep backup"
    and the result was
    "root 14187 0.0 0.0 103248 792 pts/0 S+ 16:16 0:00 \_ grep backup"
    Is this OK - does it mean the backup isn't running any more?

    Looking at the "cpbackup_transporter.log" shows a bunch of errors (there were 3 attempts to upload each of the 2 files), something like:
    "warn [cpbackup_transporter] Upload attempt failed: Server closed the connection after session timeout..."
    But eventually, the cpbackup_transporter stopped.
    Suppose the problem was the connection to FTP storage? The filesize of 3.5GB is probably not helpful, although it's not too big to upload (I can upload a max of 16GB filesize to ADrive). But since the transfer stopped after a few unsucessfull attempts, this shouldn't be the cause of my original problems, or am I wrong?

    Since I do have another FTP storage (that I used originally, when my problems started), I run another test (disabled the ADrive FTP, enabled the original FTP storage again), and run the "/usr/local/cpanel/bin/backup --force" again.
    And everything went as it should - the backup completed, I received a message with sucessfull backup log, the transfer was running for a while, and eventually the backup file was saved to the VPS "/backup" folder, and also on the FTP storage, both in "2014-05-01" folder and in "monthly/2014-05-01".
    So there seems to be no problems any more - it looks as if one particular backup process hanged for some reason on the 8th of April, and it was stopping the regular daily backup process from running. It appears that I've solved this now, but is there something that I should do to prevent it from happening again.
    Apart from this, I would actually like to be able to use some other FTP storage apart from the one I'm using now, becuse this one is accessible just through my VPS, so I can't access it from "outside", for example with Filezilla or from another server, and that's why the ADrive FTP would be OK, as it is accessible from everywhere. Is there anything that I can check to make the FTP upload to ADrive possible?
    Thank's again
     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You could try increasing the "Timeout" value when configuring the original FTP server for backups to see if that makes a difference.

    Thank you.
     
  10. vespera

    vespera Member

    Joined:
    Apr 28, 2014
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thank you once again for leading me to solution.
    At least now I know what to check when spmething goes wrong again. I'll try to find a solution for the FTP storage.
    Best regards
     
Loading...

Share This Page