Jump to content
  • 0
IndieRO

how to migrate server from old vps to new vps

Question

3 answers to this question

Recommended Posts

  • 0

To move your files in bulk, just use rsync. When it's done, install the dependencies and re-compile Hercules on the new server.

 

To move your databases, you will need to first export to a .sql file and then import it on the new server. If you need help for this step I believe @Habilis would be best suited to help you.

Share this post


Link to post
Share on other sites
  • 0

just create a directory 

inside Hercules/sql-files

call it something like bak

mkdir ~/Hercules/sql-files/bak

 

(I don't know where is your emulator in the filesystem...  so I made a relative path to users home directory...)

Next, dump your databases in that directory using a user with access to your database(s)

If you don't know such user or you don't have it, use root (Attention, not the system root, the MySQL root user password)

Then just dump database(s)

 

mysqldump -u root -p hercrodb > ~/Hercules/sql-files/bak/hercrodb_backup.sql

If you store logs in a separate Database you may dump that too:


mysqldump -u root -p hercrolog > ~/Hercules/sql-files/bak/hercrolog_backup.sql

 

then just archive your emulator directory with your backup inside of it

tar -cvf HerculesEmulator.tar ~/Hercules

I like to use SCP now you can use either SCP or FTP to transfer that archive to your new debian VPS

On the other side just unarchive it

tar -xf HerculesEmulator.tar -C ~

 

And Import files from bak directory in your extracted emulator

cd ~/Hercules/sql-files/bak

Import main database

mysql -u root -p hercrodb < hercrodb_backup.sql

import logs database if you have it in separate databases

mysql -u root -p hercrolog < hercrolog_backup.sql

And like Meko said install all dependencies and recompile...

 

After you successfully imported your database(s) and tested server is running just 

rm -rf ~/Hercules/sql-files/bak

for a good measure....

Edited by Habilis

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.