Cloud & Telecom Solutions

Backing Up and Migrating Your WebTic VPS Print

  • 34

WebTic VPS Migration and Full Backup

This guide covers migrating a VPS to another one (plan upgrade, datacenter change) and the full backup of the system.

Full backup before migration

# 1. Back up all databases
mysqldump --all-databases -u root -p | gzip > /root/backup_all_db_$(date +%Y%m%d).sql.gz

# 2. Back up the web files
tar czf /root/backup_www_$(date +%Y%m%d).tar.gz /var/www/

# 3. Back up the system configurations
tar czf /root/backup_etc_$(date +%Y%m%d).tar.gz /etc/nginx/ /etc/php/ /etc/mysql/ /etc/crontab

# 4. List the installed packages
dpkg --get-selections > /root/packages_list.txt

Transfer to the new VPS (rsync)

# Synchronize the web files
rsync -avz --progress /var/www/ root@NEW_VPS_IP:/var/www/

# Transfer the SQL dumps
scp /root/backup_all_db_*.sql.gz root@NEW_VPS_IP:/root/

# Restore on the new VPS
ssh root@NEW_VPS_IP "zcat /root/backup_all_db_*.sql.gz | mysql -u root -p"

Migration checklist

  • ☐ Snapshot of the source VPS created in the WebTic client area
  • ☐ Database dumped and verified (mysqlcheck -u root -p --all-databases)
  • ☐ Web files synchronized and permissions verified (chown -R www-data:www-data /var/www/)
  • ☐ Nginx, PHP, MySQL configurations copied
  • ☐ Crontabs exported (crontab -l > /root/crontab_backup.txt)
  • ☐ Functional tests on the new VPS (before DNS cutover)
  • ☐ DNS TTL reduced to 300s 24h before the migration
  • ☐ DNS switch done and propagation verified

DNS migration (minimal downtime)

# 24h before: reduce the TTL
; Current DNS entry
webtic.online. 3600 IN A OLD_IP

# After validated migration: update to the new IP
webtic.online. 300 IN A NEW_IP

# Check propagation
dig +short webtic.online
nslookup webtic.online 8.8.8.8

Rollback in case of problems

  1. Immediately put the old IP back in the DNS
  2. The reduced TTL of 300s allows a fast restore
  3. Analyze the new VPS logs to identify the cause
  4. Contact WebTic support with the logs if needed

Was this answer helpful?

« Back