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.

backup refuses to run due to quota on backup drive

Discussion in 'General Discussion' started by panayot, Sep 25, 2005.

  1. panayot

    panayot Well-Known Member

    Joined:
    Nov 18, 2004
    Messages:
    125
    Likes Received:
    0
    Trophy Points:
    16
    backup refuses to run due to quota on backup drive - Edit: FIXED

    Edit: Problem Fixed!!

    Hi,

    All of a sudden backup started to turn itself off with the following message:

    Code:
    Quotas cannot be built! Your cpbackup destination is on a filesystem which has quotas enabled.  Please move it to a filesystem which does not have quotas turned on or a seperate partition/disk slice mounted at /backup.Backup has been disabled to prevent quota problems...
    WHM 10.6.0 cPanel 10.8.0-C19 RedHat Enterprise 3 i686 - WHM X v3.1.0

    My backups are on a second harddrive (hdb1 mounted as /drive2), so I turned quoatas off for it:

    root@blue [~]# quotaoff -vug /drive2

    I then checked with:
    root@blue [~]# quotaoff -vugp /drive2
    group quota on /drive2 (/dev/hdb1) is off
    user quota on /drive2 (/dev/hdb1) is off

    So all should be ok. But no :( WHM gives me the same error.

    Interestingly fstab and mtab still show there is quota on hdb1

    Code:
    root@blue [~]# cat /etc/fstab
    /dev/hda3 /       ext3    defaults,usrquota 1 1
    /dev/hda1 /boot   ext3    defaults 1 2
    none      /dev/pts devpts gid=5,mode=620 0 0
    none      /proc   proc    defaults 0 0
    none      /dev/shm tmpfs  defaults 0 0
    /dev/hda2 swap    swap    defaults 0 0
    /dev/hdb1 /drive2 ext3 defaults,usrquota 1 2
    Code:
    root@blue [~]# cat /etc/mtab
    /dev/hda3 / ext3 rw,usrquota 0 0
    none /proc proc rw 0 0
    none /dev/pts devpts rw,gid=5,mode=620 0 0
    usbdevfs /proc/bus/usb usbdevfs rw 0 0
    /dev/hda1 /boot ext3 rw 0 0
    none /dev/shm tmpfs rw 0 0
    /dev/hdb1 /drive2 ext3 rw,usrquota 0 0
    /usr/tmpDSK /tmp ext3 rw,noexec,nosuid,loop=/dev/loop0 0 0
    /tmp /var/tmp none rw,noexec,nosuid,bind 0 0
    what can I do? may be unmount and then mount the second drive, but MySQL datadir is there and I dont know how to do it without breaking it.
     
    #1 panayot, Sep 25, 2005
    Last edited: Sep 25, 2005
  2. bijo

    bijo Well-Known Member

    Joined:
    Aug 21, 2004
    Messages:
    475
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    Hello,

    Where is your mysql data directory?. Normally mysql data directory is located in /var/lib/mysql. You can find out the directory by checking the /etc/my.cnf file. if the mysql data directory is /var/lib/mysql ,
    Umount the /dev/hdb1 and then edit the fstab and remove the "usrquota". then run the following command

    mount -av

    Then try. I think, it will help you to overcome this issue.
     
    #2 bijo, Sep 25, 2005
    Last edited: Sep 25, 2005
  3. panayot

    panayot Well-Known Member

    Joined:
    Nov 18, 2004
    Messages:
    125
    Likes Received:
    0
    Trophy Points:
    16
    Thanks for the reply Bijo,

    Yes mysql datadir is usually where you mention, but I have moved it to the second drive which decreases server load and increases performance overall.

    I tried to test your suggestion using also the -f switch (thus mount only simulates mounting but does nothing actually)

    Code:
    root@blue [~]# mount -fav
    mount: /dev/hda1 already mounted on /boot
    mount: none already mounted on /dev/pts
    mount: none already mounted on /proc
    mount: none already mounted on /dev/shm
    mount: /dev/hdb1 already mounted on /drive2
    nothing was mounted
    
    It seems mount will not do mount anything that is already mounted. So maybe I should first unmount drive2 and then mount it. but this will break mysql. If nobody suggests anything different, I will wait until tonight, stop mysql then unmount and mount drive2. Hope nothing goes wrong during mounting/unmounting.
     
  4. panayot

    panayot Well-Known Member

    Joined:
    Nov 18, 2004
    Messages:
    125
    Likes Received:
    0
    Trophy Points:
    16
    FIXED :D

    maybe cpanel is reading /etc/mtab and it takes some time after running quotaoff for changes to get into mtab.

    I was also playing with mount a little, but not sure if it had any effect as I was using -f for simulation only:

    root@blue [~]# mount -fv -o remount /drive2

    may be it remounted actually. anyway, mysql runinning on drive2 did not even notice :)
     
  5. forlinuxsupport

    forlinuxsupport Well-Known Member
    PartnerNOC

    Joined:
    Dec 22, 2004
    Messages:
    386
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    hey

    I usually keep my backups under "/home/backup" and its always been fine.

    Suddenly now cpanel is complaining about quotas.

    I can't turn quotas off on the directory "/home".

    Im running latest RELEASE... but it doesnt seem to effect my CURRENT build servers.

    Anyone have any ideas ?
    Move backup to another partiton ?

    Only thing is where to move it or how to get around this ?

    cheers
    Andy
     
  6. forlinuxsupport

    forlinuxsupport Well-Known Member
    PartnerNOC

    Joined:
    Dec 22, 2004
    Messages:
    386
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    hey all

    Dont know if this is a good idea. But because I backup to /home/backup and cpanel wont let you backup to a partition with quotas on....
    If you try enable them in the interface it just says NO!!!!!!

    Once way around this its to edit the file /etc/cpbackup.conf and change the line
    BACKUPENABLE to YES

    Im not sure if this is a good idea or not. I know the backup works if I do this. (by running /scripts/cpbackup)

    My question is now why would cpanel NOT want to backup to a partition with quotas on ?
    I dont want to mess up the other quotas now by using this little work around.

    any comments ??

    cheers
    andy
     
  7. panayot

    panayot Well-Known Member

    Joined:
    Nov 18, 2004
    Messages:
    125
    Likes Received:
    0
    Trophy Points:
    16
    No idea really. with only one disk and small partitions except /home, I would get a cheap backup server at the same datacenter and use it to backup all production servers there. Backing up on the same drive as your sites, will only help you if a customer site gets hacked or customer breakes smth. But I think the main point of a backup is to use it in case of hard drive failure (it happened once to me :) forutnately had everything on a second drive).

    I guess the only problem with modifying the backup script would be possible wrong disk quotas in user accunts (part of their backup being count together with their home dir). Currently I think all backups are with root ownership and this should not happen, but may be cpanel will change it.

    Also when you update cpanel it will overwrite the backup script and you will loose your modifications.
     
  8. forlinuxsupport

    forlinuxsupport Well-Known Member
    PartnerNOC

    Joined:
    Dec 22, 2004
    Messages:
    386
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    hey

    thanks for the reply.

    We get cpanel to backup itself, to the local disk, then we use our backup script to copy it across to the "backup" server in the same datacenter.

    Out backup script basically excludes the web data to make the backups smaller (also uses rsync).

    If we didnt need to do that we would just use the backup ftp option.

    Cheers
    Andy
     
  9. tjfulopp

    tjfulopp Member

    Joined:
    Sep 22, 2005
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Slovakia / Belgium
    Quotas cannot be built - backup disabled...

    I've been backing up using cPanel weekly at /usr/backup Now, after reinstalling the server (HD fried), using the same cPanel config etc retrieved from backups, I wanted to set backup at /usr/backup again... but the server says "Quotas cannot be built! Your cpbackup destination is on a filesystem which has quotas enabled. Please move it to a filesystem which does not have quotas turned on or a seperate partition/disk slice mounted at /backup.Backup has been disabled to prevent quota problems..." What does this mean. Why this sudden msg? How to fix it? Btw, I run latest stable cPanel (autoupdated).
     
  10. forlinuxsupport

    forlinuxsupport Well-Known Member
    PartnerNOC

    Joined:
    Dec 22, 2004
    Messages:
    386
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    hi

    Cpanel is just being stubborn.
    I used to backup to /home :)

    You can force it to backup by ticking all the options you want in the backup, click save.
    It will moan about quotes. (but it does save what you have ticked)

    then just go on the command line and edit :
    vi /etc/cpbackup.conf
    BACKUPENABLE yes

    vi /etc/cpbackup.public.conf
    BACKUPENABLE yes

    that basically turns the backup on :)

    Its nasty, but it works. If someone goes into the backup config and ticks other boxes you will have to redo the above steps :)

    Regards
    andy
     
  11. tjfulopp

    tjfulopp Member

    Joined:
    Sep 22, 2005
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Slovakia / Belgium
    Thanks so much, Andy, I've just done that. Hope that will work. I assume the confirmation mails will be coming as usual every time cp backup runs.

    Generally, I don't understand where are cPanel developers and support people when it comes to problems like this. Simple backup setup in a tool like cPanel should be a breeze, we should not be having to resort to hacks like this...
     
  12. forlinuxsupport

    forlinuxsupport Well-Known Member
    PartnerNOC

    Joined:
    Dec 22, 2004
    Messages:
    386
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    yip, the emails come through fine :)

    its just silly error checking on cpanels part that disables the backup.
     
  13. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    No, it isn't silly. The backup process has to take a copy of each file before it tarballs and gzips it. This means that if you backup to a partition with quotas enabled - e.g. /home - then while the backup runs your users quota usage will double. If they don't have that much headroom in their quota allowance it will both corrupt that accounts backup and likely cause corruption in the user account, especially in email and any flat-file data system.

    That's why you should never, ever, use a partition with quotas enabled for backups, especially /home.
     
  14. tjfulopp

    tjfulopp Member

    Joined:
    Sep 22, 2005
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Slovakia / Belgium
    What to do then, Chirpy?

    Chirpy, thanks, but what should I do then? See my post #9 above.. how can I correctly allow backups on that machine (I don't have an ftp server nor second HD).

    My /usr has 2G and there is 36G free. My /home is 30G and has 116G free. Is it still safe for me to back up on /usr? Or I have to use to /home - I know it is not recommended, but space-wise that would be ok, no?
     
    #14 tjfulopp, Aug 24, 2006
    Last edited: Aug 24, 2006
  15. forlinuxsupport

    forlinuxsupport Well-Known Member
    PartnerNOC

    Joined:
    Dec 22, 2004
    Messages:
    386
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Ahh, I see the error in my ways.

    :)
     
  16. bkusnir

    bkusnir Member

    Joined:
    Aug 8, 2003
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Yea i did the prescribed fix using /usr/backup. Looks like everything should work. I'll find out in 2 hours! I didn't have this problem with my last host in which everything was under / (dev/hda3), which had quotas as well. So I wonder why it works on that server, which is running the same version of WHM/cPanel. WTF!?!
     
  17. BrooksBridges

    BrooksBridges Well-Known Member

    Joined:
    Sep 2, 2004
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    Is there some type of permenant solution for this? I made the change to /etc/cpbackup.conf, however it seems to have been changed back, possibly by upcp.

    I'm backing up to a separate raid5 array in the server that has quotas enabled for other purposes, and disabling them is *not* an option in this case.
     
  18. vamshi.e

    vamshi.e Registered

    Joined:
    Jan 30, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Quotas cannot be built! Your cpbackup destination is on a filesystem which has quotas

    Hi

    My Cpanel version is:
    WHM 11.11.0 cPanel 11.16.0-S18450
    REDHAT Enterprise 5.1 i686 on standard - WHM X v3.1.0

    we want to take backup on /home/backup and move to another backup server with the scripting process

    i edit and enabled as below

    vi /etc/cpbackup.conf
    BACKUPENABLE yes

    vi /etc/cpbackup.public.conf
    BACKUPENABLE yes

    but

    I am getting the same error message

    Quotas cannot be built! Your cpbackup destination is on a filesystem which has quotas enabled. Please move it to a filesystem which does not have quotas turned on or a separate partition/disk slice mounted at /backup.Backup has been disabled to prevent quota problems...
    Please do the needful

    Thanks
    Vamshi
     
Loading...

Share This Page