Migrate from Another Provider to DeluxHost

This guide covers migrating an existing VPS (from any provider) to a new DeluxHost VPS.

02

Before you start

  • Create the new VPS on DeluxHost with the same or compatible operating system
  • Verify the space: the new VPS must have disk equal to or larger than the original
  • Plan a maintenance window: migration requires minimal or zero downtime (depends on method)
  • Take note of IP, password, configurations of the old server
03

Linux Migration

Method 1: rsync (recommended, minimal downtime)

Copy all files from the old server to the new one via SSH:

bash
# Run from the NEW server (or from a third machine)
# Replace OLD_IP with the source server IP

# Complete sync (excludes /proc, /sys, /dev, /run)
rsync -aAXvz --progress \
  --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/lost+found"} \
  root@OLD_IP:/ /

# First run (slow), then update before cutover:
rsync -aAXvz --delete \
  --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/lost+found"} \
  root@OLD_IP:/ /

Running rsync on / overwrites network and hostname configurations. After sync, update /etc/hostname, /etc/hosts and network settings with the new VPS data.

Method 2: selective backup (safer)

Better for migrating only data and configurations, not the entire system:

bash
# On OLD server: create archive of data
tar -czf /tmp/backup-web.tar.gz /var/www/html
tar -czf /tmp/backup-mysql.tar.gz /var/lib/mysql
tar -czf /tmp/backup-nginx.tar.gz /etc/nginx
tar -czf /tmp/backup-certs.tar.gz /etc/letsencrypt

# Transfer to new server
scp /tmp/backup-*.tar.gz root@NEW_IP:/tmp/

# On NEW server: restore
cd / && tar -xzf /tmp/backup-web.tar.gz
cd / && tar -xzf /tmp/backup-nginx.tar.gz

MySQL/MariaDB database migration

bash
# On OLD server: dump all databases
mysqldump --all-databases -u root -p > /tmp/all-databases.sql

# Transfer
scp /tmp/all-databases.sql root@NEW_IP:/tmp/

# On NEW server: restore
mysql -u root -p < /tmp/all-databases.sql

WordPress site migration

bash
# Old server
cd /var/www/html/mysite
tar -czf /tmp/wordpress.tar.gz .
mysqldump -u root -p wordpress_db > /tmp/wordpress_db.sql

# New server
mkdir -p /var/www/html/mysite
cd /var/www/html/mysite
tar -xzf /tmp/wordpress.tar.gz
mysql -u root -p wordpress_db < /tmp/wordpress_db.sql

# Update wp-config.php with new DB credentials
nano /var/www/html/mysite/wp-config.php

Reinstall packages

If you want to recreate the environment from scratch (cleaner):

bash
# On old server: export package list
dpkg --get-selections > /tmp/packages.txt

# On new server: reinstall everything
dpkg --set-selections < /tmp/packages.txt
apt-get dselect-upgrade -y

DNS cutover

When the new server is ready:

  • Lower the domain's TTL to 300 seconds at least 24h before
  • When ready: change the domain's A record with the new IP
  • Wait for DNS propagation (5-30 minutes with low TTL)
  • Verify the site responds from the new server
  • Keep the old server active for 24-48h as a safety measure
04

Windows Server Migration

Method 1: robocopy (files and data)

From the old server, copy data to a shared network path or directly to the new one:

powershell
# Map the new server as network drive
net use Z: \\NEW_IP\C$ /user:Administrator PASSWORD

# Copy with robocopy (complete mirror)
robocopy C:\inetpub Z:\inetpub /MIR /COPYALL /LOG:C:\robocopy.log

# Copy other important data
robocopy C:\App Z:\App /MIR /COPYALL
robocopy C:\ProgramData Z:\ProgramData /MIR /COPYALL /XJ

Method 2: Windows Server Backup and restore

powershell
# On old server: install Windows Server Backup if not present
Install-WindowsFeature Windows-Server-Backup

# Create complete backup to network share
$policy = New-WBPolicy
$backupLocation = New-WBBackupTarget -NetworkPath "\\NEW_IP\backup" `
  -Credential (Get-Credential)
Add-WBBackupTarget -Policy $policy -Target $backupLocation
Set-WBVssBackupOptions -Policy $policy -VssFull
Add-WBVolume -Policy $policy -Volume (Get-WBVolume -AllVolumes | Where-Object {$_.MountPath -eq "C:\"})
Start-WBBackup -Policy $policy

IIS site migration

powershell
# On old server: export IIS configuration
%windir%\system32\inetsrv\appcmd list site /config /xml > C:\iis-backup.xml

# Copy file to new server, then:
%windir%\system32\inetsrv\appcmd add site /in < C:\iis-backup.xml

Or use WebDeploy module:

powershell
# Install Web Deploy on old server
# Then export a site:
msdeploy -verb:sync -source:apphostconfig="SiteName" -dest:package="C:\site.zip"

# On new server:
msdeploy -verb:sync -source:package="C:\site.zip" -dest:apphostconfig="SiteName"

SQL Server migration

sql
-- On old server: backup database
BACKUP DATABASE [DBName] TO DISK = 'C:\backup\DBName.bak' WITH FORMAT;
powershell
# Copy .bak file to new server
Copy-Item "C:\backup\DBName.bak" -Destination "\\NEW_IP\C$\backup\"
sql
-- On new server: restore
RESTORE DATABASE [DBName]
FROM DISK = 'C:\backup\DBName.bak'
WITH MOVE 'DBName' TO 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\DBName.mdf',
     MOVE 'DBName_log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\DBName_log.ldf';
05

Post-migration checklist

□ Site/application responds on new IP □ Database connected and working □ SSL certificates installed (Let's Encrypt: sudo certbot renew) □ Cron jobs recreated (crontab -l on old → crontab -e on new) □ Firewall configured (same ports as old) □ DNS updated with new IP □ Email/SMTP tested □ Automatic backups configured on new server □ Old server kept active 48h as safety

DeluxHost, opgericht in 2023, biedt hoogwaardige hostingoplossingen voor diverse digitale behoeften. Wij bieden gedeelde hosting, VPS en dedicated servers met geavanceerde beveiliging en wereldwijde datacenters.

© DeluxHost, Alle rechten voorbehouden. | BTW-nummer: IT17734661006
Alle systemen operationeel