Welcome to Centmin Mod Community
Become a Member

how can backup website from sever corrupted

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by luong ha, Apr 14, 2015.

  1. luong ha

    luong ha New Member

    6
    0
    1
    Apr 1, 2015
    Ratings:
    +0
    Local Time:
    11:15 AM
    1.7.11
    MariaDB 5.5
    i using centminmod on Vultr VM centos for my wordpress website.
    My server corrupted. my website is down. i can't access my vps on ssh or sfpt or console.
    I mounting a rescue Windows ISO to retrieve my data.
    I buy a new server, install centminmod, download directory on /home/nginx/domains/ on old VPS and upload to /home/nginx/domain/ of new VPS; download directory /usr/local/nginx/conf/conf.d on old VPS and up load to /usr/local/nginx/conf/conf.d of new vps
    so mysql file, how can i backup it. please help me?
    [​IMG]

     
  2. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    2:15 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    only one way to backup mysql reliably via mysqldump see MySQL :: MySQL 5.1 Reference Manual :: 4.5.4 mysqldump — A Database Backup Program

    in ssh

    backup
    Code:
    mysqldump -u mysqlusername -p mysqldatabasename > /path/to/mysqldatabasename_backup_date.sql
    
    restore
    Code:
    mysql -u mysqlusername -p mysqldatabasename < /path/to/mysqldatabasename_backup_date.sql
    
    however windows rescue iso might not have mysqldump so only way would be to stop mysql server and copy the /var/lib/mysql/* entire contents and import to new server WHILE new server mysql server is shutdown.

    As to the rest of mysql and server restoration unfortunately that is left up to you.

    If it's just being locked out, make sure you follow step 4 of getting started guide at Getting Started with Centmin Mod which links to CSF page CSF Firewall - Centmin Mod - Menu based Nginx installer for CentOS servers and need to take measures to whitelist your ip addresses. Especially if dynamic ips CSF Firewall - Centmin Mod - Menu based Nginx installer for CentOS servers