Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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.

SOLVED Temporary disk full in backup

Discussion in 'Data Protection' started by hayridumanli, Jul 6, 2017.

  1. hayridumanli

    hayridumanli Member

    Joined:
    Jan 11, 2014
    Messages:
    13
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    I have a new dedicated server for 2 days, CENTOS 7.3 x86_64 standard and cPanel & WHM 64.0 (build 29), but I had a backup problem in the first days.

    I have a 1 TB disk and here is the partitions;
    /home /home 10% (81,044,696 of 816,777,564)
    /var/tmp /var/tmp 19% (10,169,972 of 52,403,200)
    / / 19% (10,169,972 of 52,403,200)
    /boot /boot 34% (172,644 of 508,588)

    As you can see, tmp partition is 50 GB and home partition is 800 GB. I backup my all accounts to Amazon S3 for a long time, and I had 2 partitions in my previous VDS (boot and home), so I didn't notice the problem beforewards. Now, when I try to backup, tmp partition is getting full, first it was 95%, then it became 100%, server was stopping at all, so I killed the backup process, deleted everything in tmp and restarted the server, it worked normal then.

    The problem is that I have accounts over 30 GB and 20 GB, so while in compressing process, the tmp folder gets full. In backup configuration the backup folder is /backup as default, so the problem is in compress progress. The solutions I could think about is like this (I am not very experienced in CentOS or Linux);

    1) Merge /var/tmp disk and home disk ; it would be marvellous, it was always like this in my previous VDSs, but as far as I read from forums, you cannot combine (merge) the disks. Is there anybody who knows how to do it?
    2) Expand the tmp disk : They say it's very risky, I have to backup home folder first (which I cannot make backup as I said), then unmount home folder, expand the tmp folder, then mount home folder again and restore the backups. It's something like you have to be physically near the server, because my whole data is around 80 GB.
    3) Tell WHM/cPanel to make the compression process in home folder, not tmp folder : I think that could be the solution. Is there anybody who knows how to do it?

    Or please tell me other suggestions.

    Thanks in advance,
     
  2. SysSachin

    SysSachin Well-Known Member

    Joined:
    Aug 23, 2015
    Messages:
    564
    Likes Received:
    40
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    You have to set /backup directory for store backups files.

    Login to WHM >> Backup Configuration
    Once you have set /backup then the backup files will stored in that folder.
     
  3. hayridumanli

    hayridumanli Member

    Joined:
    Jan 11, 2014
    Messages:
    13
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    As I wrote above, /backup directory has been already set, I left it as default as I always did, attached please see screenshot.

    The problem happens when cPanel creates the backup file of big accounts, it uses tmp disk for creating the compressed account files, since tmp disk is not big enough to store the compressing file, it gets full.

    For the small accounts, it can compress the account files and put it into backup folder, I have seen it. The problem is big sized accounts.
     

    Attached Files:

  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    15,747
    Likes Received:
    312
    Trophy Points:
    433
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Why are you backing up to the same drive as your accounts? You should know that if that drive gets corrupted, or drops over dead, it happens, your backups go with it with this sort of configuration for backups.
     
  5. hayridumanli

    hayridumanli Member

    Joined:
    Jan 11, 2014
    Messages:
    13
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Of course I am not backing up to the same drive :) And I think there is a problem in my English :) OK, I write it one by one, if I make any mistake please warn me;

    1) I make backup of all of the accounts by WHM backup to Amazon S3, I make it for years, so I know how to backup to Amazon S3 and it was working very good until 2 days
    2) Backup process of WHM/cPanel goes like this;
    a) cPanel compresses an account, it gives the name as accountname.tar.gz, and this compression process is being done in tmp disk
    b) When it finishes compression, it puts the compressed accountname.tar.gz file into backup directory (as written in Backup Configuration in WHM, such as /backup)
    c) Then starts to upload the file to backup destination (in my case it's Amazon S3, or it can be ftp, etc.)
    d) In the meantime, cPanel goes on to compress the another account, then continue the process in b, c and d order.

    OK, my problem is in 2-a, if the account is 100 GB, the compression disk needs at least 100 GB I think, when it's compressed it may be 40 - 50 GB, but the needed disk space should be at least the size of account. So, I have 50 GB in tmp folder, 100 GB account cannot be compressed in this size of disk, size of tmp folder is not enough to put the compressing files. I know it, because cPanel can compress small sized accounts, puts the compressed file in /backup folder, and then sends the file to Amazon S3, I can see them in Amazon. But when the time comes to big sized accounts, it cannot finish the compression process, because the size of tmp folder is not big enough to handle the compression process.

    So, I repeat my solutions, 3 is the one about cPanel;

    1) Merge /var/tmp disk and home disk ; it would be marvellous, it was always like this in my previous VDSs, but as far as I read from forums, you cannot combine (merge) the disks. Is there anybody who knows how to do it?
    2) Expand the tmp disk : They say it's very risky, I have to backup home folder first (which I cannot make backup as I said), then unmount home folder, expand the tmp folder, then mount home folder again and restore the backups. It's something like you have to be physically near the server, because my whole data is around 80 GB.
    3) Tell WHM/cPanel to make the compression process in home folder, not tmp folder : I think that could be the solution. Is there anybody who knows how to do it?
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Updating the partition setup often requires the reinstallation of the OS. That might be the better long-term solution. In the meantime, you could configure the default backup directory in "WHM >> Backup Configuration" to "/home/backup" after creating that directory with the "mkdir /home/backup" command.

    The other solution would be to exclude the files or directories that your largest accounts use in order to reduce the space required for the backup archive to generate:

    How to Exclude Files From Backups - cPanel Knowledge Base - cPanel Documentation

    You'd then setup a custom script that manually rsyncs the excluded data to the remote destination.

    Thank you.
     
  7. hayridumanli

    hayridumanli Member

    Joined:
    Jan 11, 2014
    Messages:
    13
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Hi again,

    Changing the default backup directory from /backup to /home/backup worked like a charm. Thank you so much Michael for your support.
    But the new server has been already setup, I will transfer my accounts to a new server, so I'll follow your reinstallation of OS solution, too.
     
    cPanelMichael likes this.
Loading...

Share This Page