A cloud migration checklist for a website or business application has six stages: take an inventory, size the new server, build and secure it, copy files and databases, test on the new server before changing DNS, then cut over with a written rollback plan. Most failed migrations come from something nobody listed, such as a cron job, an email record or an IP allow-list. This guide covers each stage for a Linux or Windows application moving to a cloud VPS, with commands and India-specific checks.
It is written for small and mid-sized moves: one to a few servers, from shared hosting, an office server or another cloud. Large estates with many dependent systems need a longer assessment, but the same order applies.
1. Take an inventory before you touch anything
Write down what actually runs today, not what the old documentation says. On a Linux server, these commands show most of it:
cat /etc/os-release
systemctl list-units --type=service --state=running
sudo ss -tulpn
df -h
sudo du -xsh /var/www /var/lib/mysql /var/lib/postgresql /home /opt 2>/dev/null
crontab -l
sudo ls /etc/cron.d /var/spool/cron*
systemctl list-timers --all
apt-mark showmanual
apt-mark applies to Ubuntu and Debian; on RHEL-family systems use dnf repoquery --userinstalled. Run crontab -l for every user that owns a service, not only your own. On shared hosting you will not have shell commands for most of this, so go through the control panel: sites, databases, mailboxes, scheduled tasks, PHP version and extensions.
Record these items in one sheet:
| Area | What to record | Why it breaks migrations |
|---|---|---|
| Runtime | PHP, Node.js, Python, Java or .NET versions and extensions | A newer version can reject old code |
| Data | Database engines, versions, sizes, upload folders | Decides copy time and downtime |
| Scheduled work | Cron jobs, timers, Windows scheduled tasks | Invoices and reports silently stop |
| Secrets | Environment files, API keys, certificates, licence keys | Often stored outside the code folder |
| Outside dependencies | Payment gateways, SMS and email APIs, partner IP allow-lists | They may reject requests from a new IP |
| DNS and email | All records, including MX, SPF, DKIM and DMARC | A careless change stops mail |
Give every row an owner. If no one can explain why a service is running, find out before you leave it behind.
2. Decide the approach, the downtime window and the budget
For a first move, you normally choose between three approaches:
- Rehost: build a similar server in the cloud and move the application with few changes. It is the quickest and has the fewest unknowns.
- Replatform: make limited changes on the way, such as a supported operating system or runtime version. Budget extra testing time.
- Rebuild: redesign the application, for example into containers or separate services. Treat this as a development project, not a migration.
Avoid changing the host, the operating system, the application version and the database engine in one night. If something fails, you will not know which change caused it. The exception is an end-of-life operating system: move to a supported release, but test it as a separate step.
Next, agree how much downtime and data loss the business can accept. A brochure site can tolerate a one-hour freeze at night. An order system may need writes stopped only for the final database sync, with a maintenance page shown meanwhile. Put the window, the decision-maker and the rollback deadline in writing.
For budget, count the new server, backup storage, public IP addresses, software licences, bandwidth and the weeks when you pay for both old and new environments. If you need a GST invoice for input tax credit, check that your GSTIN is on the account before the first bill, and confirm the eligibility with your accountant.
3. Size and build the new server
Size from measurements. Look at peak (not average) CPU and memory use over at least a week, including month-end or sale days. Check current disk use, monthly growth and the temporary space a database restore needs: keeping a dump file and the restored database on one disk can need far more space than the live data. Leave headroom, and prefer a plan you can resize.
Choose the region by where your users are. For a mainly Indian audience, a data centre in India keeps network round trips short. Measure instead of assuming: ask for a test IP and run ping and mtr -rwc 100 <test-ip> from the networks your users actually use, such as office broadband and mobile data.
Harden the server before any data reaches it: a non-root sudo user, SSH keys, a firewall that opens only what you need, automatic security updates and time synchronisation. Follow the first 30 minutes of VPS setup for the exact steps. Keep database ports such as 3306 and 5432 closed to the internet.
Save your build steps in a script or a text file. You will need them if you rebuild after a failed rehearsal. Set the same time zone behaviour as the old server too, or note the difference: a cron job written for IST will run five and a half hours off on a server set to UTC.
4. Copy files and databases safely
Before copying, take a full backup of the source and keep it somewhere that neither server can overwrite. A backup counts only after a test restore; see cloud server backups and restore tests.
Files
On Linux, rsync over SSH lets you copy most data days earlier and send only the changes at cutover. Run it from the old server with a dry run first:
rsync -avz --dry-run /var/www/app/ deploy@203.0.113.10:/var/www/app/
rsync -avz --info=progress2 /var/www/app/ deploy@203.0.113.10:/var/www/app/
The trailing slash on the source copies the folder's contents. Add --delete only after checking the dry-run output, because it removes files on the destination that are missing from the source. Afterwards, check ownership and permissions: user and group IDs often differ between servers. The IP address above is a documentation example; use your own.
For Windows servers, robocopy can copy file trees. Treat its /MIR option with the same care as --delete. IIS sites, application pools, bindings, certificates and scheduled tasks must be recreated or exported separately.
Databases
Do not copy the data folder of a running database. Use the engine's own tools. For MySQL or MariaDB with InnoDB tables:
set -o pipefail
mysqldump --single-transaction --routines --triggers --events appdb | gzip > appdb.sql.gz
gunzip -c appdb.sql.gz | mysql appdb
Run the first two lines on the source and the third on the destination, after creating the empty database. --single-transaction gives a consistent snapshot for InnoDB, not for MyISAM tables, and schema changes should not run during the dump. Create database users and grants separately. For PostgreSQL:
pg_dumpall --globals-only > globals.sql
pg_dump -Fc -d appdb -f appdb.dump
pg_restore --exit-on-error -d appdb appdb.dump
Review and load globals.sql first so that roles exist, then restore into an empty database. Dump files contain real data and globals.sql can contain password hashes, so transfer them over SSH, restrict their permissions and delete them when the migration is closed. For SQL Server, use a native backup and restore, and then check logins, which are not carried inside the database backup.
Time the full dump, transfer and restore during the rehearsal. That number, plus testing time, is your realistic downtime window.
5. Test on the new server before changing DNS
You can test the new server under your real domain name while the public still reaches the old one. Either add a line to your computer's hosts file, or use curl with --resolve:
curl -I --resolve www.example.in:443:203.0.113.10 https://www.example.in/
HTTPS needs a certificate on the new server at this stage. A standard HTTP-01 certificate request will usually fail while DNS still points to the old server. You can use a DNS-01 challenge, or securely copy the existing certificate and private key if its terms allow, and set up automatic renewal after cutover.
Before testing, stop the copy from acting like production. Disable cron jobs, queue workers, payment callbacks and outgoing customer email, or point them to test credentials. Otherwise customers may receive duplicate messages or be charged twice.
Then test real tasks, not only the home page:
- Log in, create a record, search for it, edit it and delete it.
- Upload and download a file.
- Complete a payment in the gateway's test mode.
- Generate a PDF invoice or report, and check fonts, the rupee symbol and dates.
- Send a test email and check SPF, DKIM and DMARC results in the message headers.
- Compare row counts for important tables with the source.
- Reboot the server and confirm that every service starts by itself.
- Read the application and web server logs for errors.
6. Cut over DNS with a rollback plan
At least one full old TTL period before cutover, lower the TTL on the records you will change, commonly to 300 seconds. If the current TTL is 86400, make this change more than a day ahead. If you are also moving DNS providers, do that as a separate, earlier step and copy every record first. A website move normally changes A, AAAA or CNAME records only; leave MX records alone unless email is moving too. Remove or update any old AAAA record, or some visitors will keep reaching the old server over IPv6. If the server sends mail, update SPF and ask your provider about reverse DNS and outbound port 25 rules.
A practical cutover sequence:
- Announce the window and freeze code deployments.
- Show a maintenance page or set the old application to read-only.
- Stop background workers and scheduled jobs on the old server.
- Run the final database dump and restore, then a final file sync.
- Run a short smoke test on the new server.
- Change DNS, then enable cron jobs, workers and live API credentials on the new server only.
- Watch error logs, orders, payments and email for the next few hours.
Some visitors will reach the old server for a while after the change. Keep it read-only, show the maintenance page, or proxy requests to the new server, so that two databases never accept writes. Send payment gateway callbacks through the same check.
Rollback is easy before the new server accepts its first write: point DNS back and re-enable the old application. After new orders or records arrive, going back also means moving that new data to the old database. Decide in advance who can call a rollback, by what time, and how new data will be handled. Keep the old server for an agreed period, often one to two weeks, before you cancel it.
India-specific compliance checks
Migration changes where personal data is stored and who can access it, so update your records at the same time.
- DPDP: if you process digital personal data, review your obligations under the Digital Personal Data Protection Act, 2023 and the rules made under it, which take effect in phases. Check your contracts with processors, security safeguards and breach handling. Official text is available from the Ministry of Electronics and IT. Our article on DPDP and hosting in India gives background.
- Sector rules: some regulated sectors have their own localisation or outsourcing requirements, for example RBI rules on storing payment system data. A server in India does not by itself make you compliant.
- Logs and incidents: CERT-In directions issued in 2022 set requirements on incident reporting and log retention. Confirm which apply to you, and set up logging on the new server accordingly.
- Old copies: when you retire the old server, remove data, backups and temporary dumps as your retention policy requires, and get confirmation where the provider offers it.
This is a checklist, not legal advice. Ask a qualified adviser about your own obligations.
After the move: the first two weeks
- Confirm that backups run on the new server and restore one of them.
- Check that each scheduled job ran once, at the right time.
- Monitor uptime, disk, memory, CPU and certificate expiry with alerts that reach a person.
- Test certificate renewal; with Certbot, use
certbot renew --dry-run. - Raise the DNS TTL to its normal value once you are sure you will not roll back.
- Remove temporary SSH keys, firewall rules and migration accounts.
- Resize only after you have real usage figures.
How AvertHost can help
AvertHost offers managed Linux cloud VPS and Windows cloud VPS hosted in Delhi, with a 99.9% uptime SLA and 24/7 support. Our cloud services page lists data migration as a step in the implementation process. Before you start, share your inventory sheet and ask in writing what migration help covers for your application, who handles databases and DNS, what the downtime plan is, and what is managed after go-live.
FAQ
How long does it take to migrate a website to a cloud server?
It depends on data size, the number of integrations and how much changes during the move. Copying a small site may take hours, while inventory, rehearsal and testing can take several days. Use the timings from your rehearsal to plan the cutover.
Can I migrate to the cloud with zero downtime?
For a static site, visitors may notice nothing because both copies can serve the same files. An application with a database is harder: without database replication and a carefully tested switch, plan a short write freeze. Do not promise zero downtime unless you have rehearsed it.
Will changing hosting affect my search rankings?
If URLs, content and redirects stay the same, a hosting move does not require search engines to relearn your site. Problems usually come from errors: a blocking robots.txt copied from a test server, a leftover noindex tag, broken redirects or long outages. Check these straight after cutover and watch Google Search Console.
Do I need to move email along with my website?
No. Website and email can sit with different providers. Keep MX, SPF, DKIM and DMARC records intact, and update SPF only if the sending server changes. If your old shared hosting also holds your mailboxes, arrange the email move before you cancel that account.
When should I cancel the old server?
After the new server has run through your normal business cycle checks, backups have been restored successfully, DNS and logs show no meaningful traffic to the old one, and you have kept any data you are required to retain.