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.

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:
    174
    Likes Received:
    10
    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
     
  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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,037
    Likes Received:
    1,281
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

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

    Thanks!
     
Loading...

Share This Page