Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

SOLVED Make backup only for databases

Discussion in 'Data Protection' started by Abdelmks, Mar 21, 2017.

  1. Abdelmks

    Abdelmks Active Member

    Joined:
    Aug 4, 2016
    Messages:
    30
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    Morocco
    cPanel Access Level:
    Root Administrator
    Hello
    I have tested backups for databases only, and I find it on : /home/backup/[date_of_your_backup]/system/dirs/_var_lib_mysql_.tar.gz
    I have those questions .. how to use those backups after ? because they are with an incomprehensible extension. can I have backups separately, one file .sql for each user ?
    Thank you
     
  2. Eminds

    Eminds Well-Known Member

    Joined:
    Nov 10, 2016
    Messages:
    274
    Likes Received:
    21
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
    .tar.gz files are actually easy file to restore when there is a situation where you have to restore complete account. You can use the Restore account feature in WHM and restore the account easily using .tar.gz file provided its a full back up file.

    If you just want to restore the database then you have untar the tar.gz file using command

    tar -zxvf file name and then you can move the mysql DBs to the /var/lib/mysql making sure that the permissions are correct.

    another way is to dump the mysql databases on the source server using comand

    mysqldump database_name > database_name.sql

    move the file backup file to source server using FTP or rsync and then restore the database using command

    mysql database_name < database_name.sql
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Abdelmks

    Abdelmks Active Member

    Joined:
    Aug 4, 2016
    Messages:
    30
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    Morocco
    cPanel Access Level:
    Root Administrator
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,442
    Likes Received:
    1,961
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    I'm happy to see the answer you received was helpful. I'm marking this thread as solved.

    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice