Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Mar 2003
    Posts
    27

    Default Database backup question

    In a hurry and not got time to go and look at the code / test it so asking here in case someone already knows.

    I want to create a database which will be used only as a search index for another database. The database itself will be many million rows, don't recall offhand, was something like 15-20 million rows. The problem is, MySQL dump takes forever whilst dumping these tables and as such I want to not back this database up.

    If I create this database manually (i.e. not through cPanel), will the cPanel backup feature ignore it and not back it up?

    Thanks

  2. #2
    Member
    Join Date
    Oct 2003
    Location
    Dickson City, Pennsylvania (USA)
    Posts
    48

    Default

    If you're doing it for a user account, so long as you preclude the database name with the account name and an underscore, cPanel will recognize that database as a part of the account property. Aside from that, cPanel will back up all databases, and doesn't care who created them or where or how they were done.

    So if you are doing it per-user and want to create the database for a user with the login michael, for a database with the name cars, and you're doing it from SSH, just access MySQL from the command line using your login credentials (with MySQL permissions) or root access (if root is granted access). From there, just type:

    CREATE DATABASE michael_cars;

    Then grant your permissions, et cetera, and create the tables using either the command line options or the MySQL client command line.

    After that, yes.... cPanel will back it up, no worries.

    ~ Dan
    ^--- I wrote that.
    http://www.parasane.net/
    <plug shame="no">
    We also offercPanel/WHM hosting plans that include full PHP text-to-speech technology
    We created it so that you can play with it!
    </plug>

  3. #3
    Member
    Join Date
    Mar 2003
    Posts
    27

    Default

    Damn, was hoping it wouldn't back it up.

    Maybe if I create a cPanel users and set the backup system to exclude that user it won't backup this database?

  4. #4
    Member
    Join Date
    Oct 2003
    Location
    Dickson City, Pennsylvania (USA)
    Posts
    48

    Default

    Actually, I just double-checked in WHM (WHM 10.0.0 cPanel 10.0.0-R112) and the MySQL backup allows the following configuration options:

    x Per Accounts Only
    x Per Accounts and Entire Mysql Dir
    x Mysql Dir Only

    So you could select Per Accounts Only and then name the database to a flat name (not associated with any account) and it will be skipped. Any other databases not associated with accounts will also be skipped, of course.

    There are other ways to work around this, but they'd be a bit more advanced.

    ~ Dan
    ^--- I wrote that.
    http://www.parasane.net/
    <plug shame="no">
    We also offercPanel/WHM hosting plans that include full PHP text-to-speech technology
    We created it so that you can play with it!
    </plug>

  5. #5
    Member xisn's Avatar
    Join Date
    Dec 2004
    Posts
    117
    cPanel/Enkompass Access Level

    Root Administrator

    Question Easy method

    I run something similiar on my database, I just created a dummy account in cPanel then removed it from the backup option:

    Backup >> Configure Backup >> Select Specific Users >> Save

    It does not get backed up..

    There may be better ways to do this I am sure!

    I have no need to backup this database as I only run the Queries once a week and dump the DB via CRON.

  6. #6
    Member
    Join Date
    Mar 2003
    Posts
    27

    Default

    Sounds good, looks like I will be able to do exactly what I need without cPanel jumping in and doing what it wants.

    Quote Originally Posted by xisn
    I run something similiar on my database, I just created a dummy account in cPanel then removed it from the backup option:

    Backup >> Configure Backup >> Select Specific Users >> Save

    It does not get backed up..

    There may be better ways to do this I am sure!

    I have no need to backup this database as I only run the Queries once a week and dump the DB via CRON.
    Pretty much exactly what I want. Nice to know it's possible .

Similar Threads & Tags
Similar threads

  1. Question about adding to database
    By lasalp in forum Database Discussions
    Replies: 1
    Last Post: 05-05-2008, 12:30 PM
  2. Database Connection question
    By calexander in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 08-17-2005, 08:53 AM
  3. WHM backup won't backup all the database
    By NetGeek in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 01-17-2005, 03:52 AM
  4. mysql database question
    By webbhost in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 06-10-2004, 10:02 AM
  5. Database Connection Question
    By N9ne in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-28-2003, 08:18 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube