Should I Create Snapshots of My Running Webserver on Hetzner?

0
1
Asked By CuriousCat42 On

Hey folks! I'm currently managing a VPS on Hetzner that runs a web server. I usually create a snapshot before making significant changes, as it allows me to revert back if something goes awry. The Hetzner web interface makes this process pretty straightforward. However, it advises shutting down the instance first to prevent any data corruption, although I've taken snapshots without doing that and everything seemed fine. What do you think? Is it risky to snapshot a running web server, or is it generally safe? I really want to avoid shutting down my services just for a snapshot if it's not absolutely necessary.

1 Answer

Answered By TechieTim On

Creating snapshots of a live system can lead to data inconsistency, especially with databases. When you take a snapshot while your web server is running, you might miss transactions that are in process, which can lead to things like lost sales or corrupt database states if the power suddenly goes out during the snapshot. It’s recommended to ‘quiesce’ databases beforehand, which means making sure all pending operations are completed before you back up. If you're just running a small site with infrequent transactions, though, you might not face major issues, but it's always best to err on the side of caution if you can.

SnapshotNinja -

That makes sense! I’m not too worried about losing transactions since I only get about one order a day. But I do worry about restoring a snapshot and facing issues like ‘No connection to database.’ I just want to make sure that the snapshotting process won’t corrupt files, especially if something's mid-write.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.