on: Sun Jun 22 08:00:34 UTC 2008, Gergely Buday gbuday at gmail.com wrote:
Dear CentOs users,
I have a centos server with nothing important at the moment, but I would like to install some web-based project management tool (trac for the curious) that would contain important data. And, as my network is growing the configuration of the server is becoming complex. I would like to have a proper backup so that I can restore the whole system easily, should any problem occur. What do you recommend?
I'm not an expert on this, so my first idea is that I could do a per application backup and create a tar file of the /etc. The latter especially could be too naive. And, a push-the-button method that handles all in once, not depending on the app number would be much better.
Another thing: how I could do this to be safe across a centos upgrade?
I have recently moved from Trac to Redmine for project management (and I strongly recommend that you consider this as an alternative to Trac, it is far more powerful to use and much easier to set up) but I had/have exactly the same problems that you are facing. The difficulty is that Trac has a DBMS backend, usually MySQl but in my case PostgreSQl. This complicates the issue since it is not enough to simply tar up the application site.
What I ended up doing was building a hot site spare server to accommodate all of these types of applications (Trac project management, subversion repositories, drupal user cms sites, imapd user mailboxes, avantfax fax archives). Then, for applications that employed a database backend, I setup regular cron jobs to dump the backend databases into a ./dbdump directory that I added to the root of each site's file system. I added an rsync command to the end of the dump command to then move the entire site to the backup box at the end of the dump. On the backup machine I added a cron job to reload the database from the dump.
This entails some background work to set up. You must initialize and configure the appropriate DBMS on the backup server with the requisite databases and database owners. You must ensure that the application's users and groups are properly replicated there. You may need to install and configure the application itself. You may need to configure apache if the application uses a web frontend, like Trac. You need to setup SSL host to host root authentication for rsync. And there are no doubt several other little things that need to be accommodated but that I no doubt have forgotten.
However, what this gives you is a hot site backup that a simple change to DNS can enable.