Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Move Hostinger VPS to New Data Center: Backup, Reinstall, Restore

· 6 min read · Home Tech

In this article
  1. Why You Might Move Data Centers
  2. How Hostinger VPS Migration Works
  3. Step-by-Step: Backup, Reinstall, Restore
  4. Common Problems and How to Avoid Them
  5. Time and Effort
  6. Alternatives to Manual Migration
  7. Frequently Asked Questions

To move your Hostinger VPS to a new data center, you must back up your site, reinstall the OS on a new VPS in the target location, and restore the backup. Hostinger does not offer a one-click data center migration for VPS, so the process is manual but straightforward.

Why You Might Move Data Centers

Data center location affects latency for your visitors. If your audience is in Europe but your VPS is in the US, every request has to cross the Atlantic, adding 50–150 ms of round-trip time. Moving to a closer data center can significantly improve load times. Other reasons include compliance (data residency laws), wanting better peering with a specific network, or consolidating infrastructure to a region where you have other servers.

Hostinger has data centers in the USA, UK, Netherlands, Lithuania, India, Singapore, and Brazil. Each VPS plan is tied to a location at creation; you cannot simply change the region on an existing VPS. You must create a new VPS in the desired location.

How Hostinger VPS Migration Works

Hostinger does not provide a built-in tool to clone your server to another data center. The migration process is essentially a manual backup-and-restore operation:

  1. Create a full backup of your current VPS (files and databases).
  2. Provision a new VPS in the target data center with the same or better specs.
  3. Reinstall the same operating system and control panel (if any) on the new VPS.
  4. Transfer the backup files to the new server.
  5. Restore the files and databases, then update configuration (DNS, IP addresses, cron jobs, etc.).

This is a common task for sysadmins, and the steps are well-documented for Linux servers and common panels like CyberPanel or HestiaCP.

Step-by-Step: Backup, Reinstall, Restore

1. Create a Full Backup

Before touching anything, make a complete backup. This includes all website files (usually in /home or /var/www) and all databases (MySQL/MariaDB). You can use Hostinger’s built-in VPS backup tool (if enabled) or do it manually via SSH.

For files, use tar to archive the web root:

tar -czf /backup/files.tar.gz /home

For databases, use mysqldump for each database:

mysqldump -u root -p --all-databases > /backup/db.sql

Download both files to your local machine or a cloud storage bucket. Verify the archive integrity with tar -tzf before proceeding.

2. Provision a New VPS in the Target Data Center

Log into your Hostinger hPanel, go to VPS, and click “Add VPS”. Select the data center you want (e.g., “Europe (UK)” or “Asia (Singapore)”). Choose the same OS and control panel as your current server to minimize compatibility issues. Note the new server’s IP address and root password.

3. Reinstall the OS (if needed)

If you chose the same OS during provisioning, no reinstall is needed. However, if you want to start fresh, you can reinstall the OS from hPanel, but that will wipe the server. Since this is a new VPS, it’s already clean. Just ensure the OS version matches (e.g., Ubuntu 22.04, not 20.04) to avoid software version mismatches.

4. Transfer and Restore Backup

Upload the backup files to the new server using SCP or SFTP:

scp /backup/files.tar.gz root@new-server-ip:/backup/

Then extract and restore:

tar -xzf /backup/files.tar.gz -C /

For databases, import the dump:

mysql -u root -p < /backup/db.sql

Make sure file permissions are correct (e.g., chown -R www-data:www-data for web files).

5. Update Configuration and DNS

The new server has a different IP address. Update your DNS A records to point to the new IP. Also update any hardcoded IPs in your application (e.g., database connection strings, API endpoints). If you use a control panel, re-issue SSL certificates (Let’s Encrypt) for the new server.

Common Problems and How to Avoid Them

  • MySQL version mismatch: If the old server runs MySQL 5.7 and the new one runs MySQL 8.0, the dump may have compatibility issues. Use mysqldump --compatible=mysql40 or upgrade the database after import.
  • File path differences: If you used a custom web root (e.g., /var/www/html vs /home/user/public_html), update your web server configuration (Apache/Nginx) accordingly.
  • Cron jobs and services: Recreate cron jobs (crontab -e) and enable services (systemctl enable) that were running on the old server.
  • Firewall rules: The new server may have a different firewall configuration. Open the necessary ports (80, 443, SSH) in UFW or iptables.
  • IP-based security: If your application restricts access by IP, update those rules to the new IP.

Time and Effort

The entire process can take anywhere from 30 minutes to a few hours, depending on the size of your site and your familiarity with Linux. The download/upload of backups is often the bottleneck. For large sites (10+ GB), consider using rsync instead of a full archive, as it can resume interrupted transfers and only sync changes.

If you use a managed service like Hostinger’s managed WordPress, you might be able to use a migration plugin, but for a VPS, manual is the norm.

Alternatives to Manual Migration

  • Use a VPS snapshot: Hostinger allows you to create snapshots of your VPS. You can take a snapshot, but you cannot directly deploy it to a different data center. However, you can download the snapshot and restore it on the new VPS (if the OS is identical).
  • Use a migration service: Some third-party services (like Migrate to Cloud) can handle the transfer for a fee. But for a single VPS, the manual method is usually cheaper and more transparent.
  • Reinstall from scratch: If you have configuration management (Ansible, Docker, etc.), you can rebuild the server from code, which is cleaner than restoring a backup.

Frequently Asked Questions

Can I change the data center of my existing Hostinger VPS?

No. Hostinger does not allow you to change the data center of an existing VPS. You must create a new VPS in the desired location and migrate your data.

Will my IP address change?

Yes. A new VPS will have a new IP address. You will need to update your DNS records and any services that rely on the old IP.

Do I need to reinstall the OS on the new VPS?

Not necessarily. When you create a new VPS, you choose the OS. If you pick the same OS as your old server, you can skip the reinstall step and just restore your data.

How long does the migration take?

It depends on the size of your data and your internet speed. For a typical small website (1-2 GB), the transfer might take 10-20 minutes. For larger sites, allow more time.

What about SSL certificates?

You will need to re-issue SSL certificates for the new server. If you use Let’s Encrypt, you can run certbot --nginx or certbot --apache to get new certificates automatically.

Can I keep my old VPS running during migration?

Yes. Keep the old VPS running until the new one is fully configured and tested. This minimizes downtime. Once everything works on the new server, you can switch DNS and then decommission the old VPS.