Learn about Centmin Mod LEMP Stack today
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

    Apr 1, 2015
    Local Time:
    3:28 AM
    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?

  2. eva2000

    eva2000 Administrator Staff Member

    May 24, 2014
    Brisbane, Australia
    Local Time:
    6:28 AM
    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

    mysqldump -u mysqlusername -p mysqldatabasename > /path/to/mysqldatabasename_backup_date.sql
    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