Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Ranx99's avatar

Destroy server and rebuild it again

Lets say that something wrong happened to the server:

  • Is it possible to destroy (re-provision) it and rebuild it again?

  • If so, what will happen to the database and the data its contain?

Thank you,

0 likes
2 replies
PaulMaxOS's avatar
Level 8

Well, all of that depends on your specific setup. Say you have your app, filesystem and database on the same hardware instance without any backups and dumps, then I guess you’ll have a hard time.

If your dB is decoupled from your app instance, for example by using a PaaS solution like AWS RDS then your data obviously won’t be lost as the dB is decouple from the instance your app is running on.

If you are planning to „destroy“ your current server then

  • dump your DB
  • backup your filesystem
  • launch a new instance
  • install app
  • source new DB from your dump
  • import your files from the backup of your filesystem
  • test if your app is running fine
  • switch DNS to point to your new server
  • if everything’s going fine, you probably can „destroy“ your old server
1 like

Please or to participate in this conversation.