Join the community today
Register Now

Transfer database from MariaDB 10.0.23 to MariaDB 10.0.23

Discussion in 'System Administration' started by pamamolf, Feb 1, 2016.

  1. pamamolf

    pamamolf Well-Known Member

    2,820
    253
    83
    May 31, 2014
    Ratings:
    +447
    Local Time:
    5:04 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    Hi

    I have a server running MariaDB 10.0.23 and i want to move the database to another server running exactly the same version :)

    Dumping the database to .sql and importing it is always ok for me but the database is big like 60gb uncompressed and it will take a lot of time...

    Can i just set the databse as read only and rsync the folder and the contents in it from /var/lib/mysql/database_folder/* ?

    Any tips?

    Thank you
     
  2. Sunka

    Sunka Active Member

    932
    242
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +392
    Local Time:
    4:04 PM
    Nginx 1.13.3
    MariaDB 10.1.24
    Rsync mysql database files? | Centmin Mod Community
    You asked question, @eva2000 answered => MariaDB - Migrating site db, the fastest way? | Centmin Mod Community

     
    Last edited: Feb 1, 2016
    • Like Like x 1
  3. eva2000

    eva2000 Administrator Staff Member

    30,945
    6,914
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,411
    Local Time:
    1:04 AM
    Nginx 1.13.x
    MariaDB 5.5
  4. pamamolf

    pamamolf Well-Known Member

    2,820
    253
    83
    May 31, 2014
    Ratings:
    +447
    Local Time:
    5:04 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    There is no space left to compress it on the disk :(
     
  5. eva2000

    eva2000 Administrator Staff Member

    30,945
    6,914
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,411
    Local Time:
    1:04 AM
    Nginx 1.13.x
    MariaDB 5.5
    that's why choosing server hardware spec's is important for cpu, ram and disk space ;)

    looks like you'd need to somehow free some space and/or do a direct mysqldump + pipe to the remote server as outlined at https://community.centminmod.com/posts/22702/

    rest is up to you.. or hire someone professionally as doing this incorrectly, could mean corrupted database and data !
     
    • Informative Informative x 1
  6. dorobo

    dorobo Active Member

    420
    104
    43
    Jun 6, 2014
    Ratings:
    +162
    Local Time:
    11:04 PM
    latest
    latest
    what about stopping MariaDB first on both servers and then rsync?
     
  7. RoldanLT

    RoldanLT Well-Known Member

    3,978
    965
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,329
    Local Time:
    11:04 PM
    1.11
    10.2
    I don't know if this reliable, but be sure to have exact my.cnf config.

    Or the best way is to run mysqldump on remote server.
     
  8. pamamolf

    pamamolf Well-Known Member

    2,820
    253
    83
    May 31, 2014
    Ratings:
    +447
    Local Time:
    5:04 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    This is what i was thinking to do and if will not work then i will do a mysqldump :)
     
  9. eva2000

    eva2000 Administrator Staff Member

    30,945
    6,914
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,411
    Local Time:
    1:04 AM
    Nginx 1.13.x
    MariaDB 5.5
    you'd have rsync everything in /var/lib/mysql and ideally destination /var/lib/mysql should be empty
     
    • Like Like x 1
    • Informative Informative x 1