If you followed the Setup roller weblogger 4.1 on Glassfish v2 tutorial, or you do have a roller installation already in place, you probably want to back that up somehow.
Backup the file system
Since I do not know where you possibly will have installed roller to, I am using the locations from the previous howto. The backup procedure should not be that complex after all.
The data residing on your filesystem (i know, the database reside on the file system too), is the data you uploaded into you blog. You do have a
/opt/roller/uploads directory for example. Depending on how many blogs you have created, there are numerous folders inside. Each sub-folder represents data for another blog. So if you blog is called
datapile then there will be a
For the sake of simplicity you can of course just backup the whole
/opt/roller folder which should also save the custom themes you created eventually. If you installed it the way as described in the tutorial at the beginning, you do also backup search indexes and the glassfish installation with this.
Caution: You might not have deleted the
/opt/roller/tmp directory yet. You might backup this temporary files too in this case. If you backup the full
/opt/roller directory, you might remove the
/opt/roller/tmp folder manually, or at least move it to another location, so your compressed archive will not pack that (unnecessary) information too. A simple command line might look like as follows:
Restore the file system
In order to restore the file system you have to recreate your installation and then copy the files back to the location where the installation can find them, or simply untar your backed up
Backup the database
The database can be backed up pretty easily. The part to remember is that you switch to the postgres user when you execute the
pg_dumpall > /tmp/rollerDb.dump command.
The backup command order in this case is:
1 2 3 4
Restore the database
Restoring the full database is a pretty easy task. On a test installation I did, this worked like a charm. I really hope there’s nothing more to add to it.
1 2 3 4 5
After having played back the information into the database, you might need to adopt the postgres passwords back to the values you have set them during your installation on the servlet container (in this case glassfish). You might otherwise end up with some ugly exceptions. To do that start the
psql tool as postgres user and enter the following statements (of course adopt to your password ;) ).
1 2 3
Especially when it comes to handling the database stuff, the PostgreSQL documentation was very helpful.