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.

How to set Legacy system to only backup MySql databases

Discussion in 'Data Protection' started by Simplyfriday, Jun 29, 2015.

  1. Simplyfriday

    Simplyfriday Registered

    Joined:
    Jun 29, 2015
    Messages:
    3
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Los Angeles
    cPanel Access Level:
    Root Administrator
    I am running a VPS hosted server with root access. I have two databases that I need to backup - a wordpress database and a forums database.

    I have been using the legacy system to backup the entire server and then using S3BackupWHM to move the backup over to an S3 account.

    Because we hold a lot of audio / visual files on the server the resulting .tar.gz was over 39 Gig. It ended up utilizing so much resource that the server started throwing off lots of different errors so I halted the process.

    I have now got a full backup of the entire AV files and going forward am loading new AV files direct to S3.

    So - right now - I only need to back up the MySql databases - not the entire account.

    My question is - how do I setup the legacy system to only backup the mysql databases and ignore the other directories?

    Thank you,

    Andrew
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,471
    Likes Received:
    199
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  3. Simplyfriday

    Simplyfriday Registered

    Joined:
    Jun 29, 2015
    Messages:
    3
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Los Angeles
    cPanel Access Level:
    Root Administrator
    Thank you - I've read the docs and they make sense - I have a couple of questions on syntax if you could possibly give it a once over.

    So the cpbackup-exclude.conf comes has the following files already in there:

    */.wysiwygPro_*
    */core.[0-9]+$
    .MirrorSearch
    .cpan
    .cpanel/caches
    .cpanel/datastore
    .cpcpan
    .sqmailattach
    access-logs
    public_ftp/.ftpquota


    When I use Filezilla to ftp into my server the Remote site address of the directory I wish to exclude is:

    /home/username/public_html/board

    My first question is - do I add the address just like that?

    I ask because .cpan and .cpcpan sit inside the home directory so maybe I should add it as:

    .username/public_html/board

    My second question is that I have two additional accounts (usernames) within the home directory that I was using for build and test sites. I don't need either of them backed up. So can I add the following:

    /home/usernametest
    /home/usernamebuild

    or would it be:

    .usernametest
    .usernamebuild


    Thank you very much,

    Andrew
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,471
    Likes Received:
    199
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    You wouldn't add a dot to an existing directory name. Any directory with a dot in its name already, like .cpan, is for the system. In most cases, you wouldn't have a need to even see them. That is unless you're editing your .htaccess file for some reason, for example. These dot files can be hidden from view.

    This thread may be of some use in answering both your questions:
    https://forums.cpanel.net/threads/cpbackup-exclude-conf-format-missing-something.117809/

    When you think about the examples you've quoted from the Docs, this:
    public_ftp/.ftpquota
    and this:
    public_html/board

    ...should be the same sort of thing as far as location goes. The first is excluding a file (in this case a dot quota file), the other is excluding the entire directory, /board.


    Addon domains:
    public_html/domain


    Same thing.


    Any additional accounts you've created (that you mention)
    Can be excluded from system backups via WHM.


    When you're learning, it's always best to have a small account you can play round with and test things on. This is one of those things you might want to test with a bit first on a small account. Exclude a fake directory or files you created and then Generate a Full Website backup from cPanel. Download the backup and peek inside to see what it grabbed and what got excluded properly.

    HTH!
     
  5. Simplyfriday

    Simplyfriday Registered

    Joined:
    Jun 29, 2015
    Messages:
    3
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Los Angeles
    cPanel Access Level:
    Root Administrator
    Thank you very much for the insight= very much appreciated and yes - I'll go and practice on a baby account!

    Have a great week
     
    Infopro likes this.
Loading...

Share This Page