Is /etc, /home and /var enough for a Ubuntu server backup?
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?
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.
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.