I am running Ubuntu server 12.04 LTS. After many trials and errors, the backup strategy I have selected resorts to using TAR (mostly because I was unable to find a tool to backup/restore dovecot mailboxes to an archive rather than mirror it to another server).
The plan is to shutdown services for the shortest possible duration when the backup is ongoing.
I guess that the most sensitive services are apache2, php and mysql since they are required for webpage availability. Postfix, mailman and dovecot can be shutdown longer, since waiting a few minutes for them is not critical.
My questions are:
Is there an order in which I need to shutdown services?
How do I find those which rely on each other?
For instance, I recon it is best to shutdown apache before php or mysql, that way the web server becomes unavailable altogether, instead of potentially displaying odd stuffs to the visitors.
What about dovecot, mailman, postfix, bind? Do they rely on mysql? Do they need other services?
What if I want to perform a snapshot?
- How can I shutdown ALL non critical running services and restart them later? The idea is to minimize as much as possible write access on the disk during the backup.
Edit: the server is hosted somewhere in the world. I can only access it through ssh.