Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    Apr 2005
    Posts
    123

    Default Backup takes too many resources

    I'm sure this has been an issue many times, however I'm trying to see what options we have here.

    We have 30+ cPanel boxes, and every night the cpu spikes for hours while it tars up the data, etc.

    What other methods are people using to backup their cPanel boxes, without making the box useless for hours?

  2. #2
    Member brianoz's Avatar
    Join Date
    Mar 2004
    Location
    Melbourne, Australia
    Posts
    1,117
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    From what I can tell, rsync is one of the best options. We can backup one machine (500 approx accounts) in about 20-30 minutes (CPU utilisation is low on the source machine). You should still run the cPanel tarball backup every now and then though.

    I have an rsync-based script called cpmr which may help - it grabs a cPanel system in one lump. See the cpmr paragraph on www.whitedoggreenfrog.com/scripts/

    The other thing that may help is upgrading your boxes to the latest cPanel which supposedly has some speed improvements.

  3. #3
    Member
    Join Date
    Dec 2003
    Posts
    30

    Default

    hello brianoz! with rsync will be the mysql databases copied too? thanks.

  4. #4
    Member brianoz's Avatar
    Join Date
    Mar 2004
    Location
    Melbourne, Australia
    Posts
    1,117
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Yes, databases are copied too, if you use a script that copies /var/lib/mysql.

    If you want to absolutely guarantee database integrity, you should ensure mysql is shut down while you do the rsync.

  5. #5
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Mar 2003
    Location
    NC
    Posts
    725
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Yeah be very careful about only rsync'ing mysql. If you have a very active DB chances are decent it will become corrupt. It should be fine as long as the DB is not written to while the copy is being done. For smaller files the chance is less but for a large and active forum it becomes harder.

    Anyways yeah just be careful with rsync and mysql!

  6. #6
    Member
    Join Date
    Aug 2008
    Posts
    63

    Default

    We make incremental backups from cpanel to the second drive and then rsync the second drive content to offsite server. Is this "dangerous" for mysql?

  7. #7
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Mar 2003
    Location
    NC
    Posts
    725
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by ljesh View Post
    We make incremental backups from cpanel to the second drive and then rsync the second drive content to offsite server. Is this "dangerous" for mysql?
    No, the rsync won't hurt the live MySQL at all.

    The only problem comes if you are rsyncing the /var/lib/mysql directory (the dump files are fine) and a write happens to the file while doing the copy.

    You can rsync dumps just fine, or even the mysql dir while it is stopped. Rsync works fine most times but on a large DB with a busy site it will most likely end up corrupted if you rsync the dir itself.

Similar Threads & Tags
Similar threads

  1. rsync takes ages ...
    By WebHostDog in forum cPanel and WHM Discussions
    Replies: 10
    Last Post: 10-24-2006, 11:33 AM
  2. How long takes a backup restore?
    By FreDy in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 04-22-2006, 01:34 PM
  3. takes to long
    By Liberty in forum cPanel and WHM Discussions
    Replies: 8
    Last Post: 11-03-2005, 02:23 PM
  4. WHM Backup takes a long time...
    By ezztro in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 02-09-2005, 04:43 PM
  5. One domain takes me to another
    By batchtech in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 04-22-2004, 09:23 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube