Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 18
  1. #1
    Member
    Join Date
    Nov 2004
    Posts
    122

    Default 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.
    Last edited by panayot; 09-25-2005 at 08:15 AM.

  2. #2
    Member bijo's Avatar
    Join Date
    Aug 2004
    Location
    India
    Posts
    475

    Default

    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.
    Last edited by bijo; 09-25-2005 at 06:25 AM.
    Bijo
    Yahoo: "bijo505"
    Msn: "bijo_baby@hotmail.com"
    AIM: "bijobaby"

    http://slashome.com

  3. #3
    Member
    Join Date
    Nov 2004
    Posts
    122

    Default

    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. #4
    Member
    Join Date
    Nov 2004
    Posts
    122

    Default

    FIXED

    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. #5
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Dec 2004
    Posts
    392

    Angry

    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 ?

    Filesystem Size Used Avail Use% Mounted on
    /dev/sda5 4.0G 1.3G 2.5G 34% /
    /dev/sda2 99M 5.9M 88M 7% /boot
    /dev/sda7 64G 4.1G 57G 7% /home
    /dev/sda3 4.0G 470M 3.3G 13% /var
    Only thing is where to move it or how to get around this ?

    cheers
    Andy
    UK Managed Hosting
    UK Linux Support
    The information given above is intended to be advice only.

  6. #6
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Dec 2004
    Posts
    392

    Red face

    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
    UK Managed Hosting
    UK Linux Support
    The information given above is intended to be advice only.

  7. #7
    Member
    Join Date
    Nov 2004
    Posts
    122

    Default

    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. #8
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Dec 2004
    Posts
    392

    Default

    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
    UK Managed Hosting
    UK Linux Support
    The information given above is intended to be advice only.

  9. #9
    Member
    Join Date
    Sep 2005
    Location
    Slovakia / Belgium
    Posts
    25

    Default 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. #10
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Dec 2004
    Posts
    392

    Cool

    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
    UK Managed Hosting
    UK Linux Support
    The information given above is intended to be advice only.

  11. #11
    Member
    Join Date
    Sep 2005
    Location
    Slovakia / Belgium
    Posts
    25

    Unhappy

    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. #12
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Dec 2004
    Posts
    392

    Default

    yip, the emails come through fine

    its just silly error checking on cpanels part that disables the backup.
    UK Managed Hosting
    UK Linux Support
    The information given above is intended to be advice only.

  13. #13
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    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.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  14. #14
    Member
    Join Date
    Sep 2005
    Location
    Slovakia / Belgium
    Posts
    25

    Question What to do then, Chirpy?

    Quote Originally Posted by chirpy
    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.
    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?
    Last edited by tjfulopp; 08-24-2006 at 06:28 AM.

  15. #15
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Dec 2004
    Posts
    392

    Default

    Ahh, I see the error in my ways.

    UK Managed Hosting
    UK Linux Support
    The information given above is intended to be advice only.

Similar Threads & Tags
Similar threads

  1. Backup due to HDD Failing
    By CoryHawk in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 07-19-2011, 04:47 PM
  2. how to remove multiple backup files from backup drive
    By crazyaboutlinux in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 11-20-2010, 01:42 AM
  3. MySQL lost priviledges due to suspend/unsuspend and backup/restore ?
    By WebHostDog in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 05-28-2009, 02:19 PM
  4. Hard Drive backup AND Remote FTP Backup
    By andy7t in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 09-13-2006, 09:43 AM
  5. Daily backup, when run backup is upto date shown - force
    By demomen in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 06-28-2005, 06:48 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube