Want to subscribe to topics you're interested in?
Become a Member

Mirror backup with 2 VPS

Discussion in 'Install & Upgrades or Pre-Install Questions' started by Venucci, Nov 12, 2019.

  1. Venucci

    Venucci Member

    63
    8
    8
    Sep 25, 2018
    Ratings:
    +8
    Local Time:
    8:26 PM
    currentyl
    10
    Please fill in any relevant information that applies to you:
    • CentOS Version: CentOS 7 64bit ?
    • Centmin Mod Version Installed: i.e. 123.09beta01
    • Nginx Version Installed: i.e. 1.17.8
    • PHP Version Installed: i.e. 7.3.11
    • MariaDB MySQL Version Installed: i.e. 10.3.18
    • When was last time updated Centmin Mod code base ? : i.e. a week ago
    • Persistent Config: Do you have any pa this command:
      Code (Text):
      Letsencrypt Y
      
    I wish to have 2 VPS 1 the original and 1 for backup. Just like raid1.how can i create this using centminmod.. I think that is called mirroring. Do you have a guide to do it properly using centminmod in both servers?thanks
     
  2. rdan

    rdan Well-Known Member

    4,731
    1,144
    113
    May 25, 2014
    Ratings:
    +1,708
    Local Time:
    3:26 AM
    Mainline
    10.2
    You can do it using rsync except for Database.
     
    • Like Like x 1
  3. Venucci

    Venucci Member

    63
    8
    8
    Sep 25, 2018
    Ratings:
    +8
    Local Time:
    8:26 PM
    currentyl
    10
    Do you have a guide how To use rsync with centminmod? And how you backup the database? Thanks for your prompt response!
     
  4. eva2000

    eva2000 Administrator Staff Member

    42,262
    9,550
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,708
    Local Time:
    5:26 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    Both linked moving data guides below have examples and links to using and mastering rsync and how to backup, transfer and restore mysql databases.

    Mirroring is basically an active form of data migration to some extent where MySQL data is mirrored via MySQL master/slave replication instead and you'd need for a way to mirror/backup sync live and backup server data via NFS share and/or lsyncd or rsync. You'd need to know how to setup/configure/manage and troubleshoot MySQL master/slave replication and NFS share/rsync etc across live and backup servers.

    If you don't know how, then non-active mirroring is basically same as data migration where you backup data and restore/sync it to backup server - just you do not update the DNS to the backup server. As such the below moving site data/migration guides are basically how you'd do non-active mirror backups for the rsync parts and you'd have to script mysql database backup/transfers from live to backup server and restore on backup server - just do not update DNS to the backup server.

    So read, learn and practice the below moving site data guides on test VPS first where the principles & steps of backing up and moving data is the same just slightly different for
    1. Moving Centmin Mod site data to another Centmin Mod server
    2. Moving cPanel/WHM site data to Centmin Mod server
    Those guides move alot more than just the site(s) in question but config files etc. You can use your own best judgement as to the config files and whether you want to move them or just use the fresh server setup Centmin Mod config files as they get auto optimised for the server Centmin Mod initially installed on.

    If your old site isn't centmin mod or cpanel/whm based, then those guides won't be 100% applicable. But the general overview of what needs moving and where everything is structured in Centmin Mod LEMP environment is worth reading up on.

    Also official site configuration files page explains the Centmin Mod structure of where the important files are so you can decide on what to backup.