4

From my experience, /etc, /home and /var holds the user created files and the others (/usr, /bin, etc) are installed by packages.

Are there other directories that I should backup besides these three?

  • 4
    Only you can answer this. We put our PHP in /srv for example. – ceejayoz May 28 '15 at 18:54
3

That's exactly the way I handle my Ubuntu backups, I have an image of the server that I update after any major changes, and use Bacula to backup the data files depending on the type of server it is. My restore time using that method is approximately two hours.

But it really depends on what your capabilities are and what your requirement are. Ideally you would not only backup the data separately so that you can restore files, you would also perform full server backups and snapshots for quick restores of the entire server.

5

The answer depends entirely on your setup: only you know if you are keeping sensitive data elsewhere that would eventually would need to be restored from a backup.

To illustrate my point, a couple examples of directories under /var that might require protection from failure (again, depending on your setup, services, etc...):

/var/lib/docker
/var/lib/ipa-data

Arguably, and from an OS only point of view, unless we're talking about bare metal installations (and even then), or heavily manually-modified systems (and why would you do that?), it's worth comparing the time it takes to restore a system versus the time it takes to generate a new system with identical configuration.

This, as well, is tied to the service you are providing, possible SLAs with your customers and other considerations.

  • /var/www and /var/lib/mysql are also biggies on a LAMP server, but the OP already mentioned /var. – Mikkel May 28 '15 at 20:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.