tinyPM Backup

Contents

Backup your tinyPM data

Always remember to backup your database before upgrading tinyPM to a newer version. It's also good to backup tinyPM configuration files to avoid loosing you database connection settings as it might be removed during the update procedure.

We use %TINYPM_PATH% to refer to a base tinyPM installation path (for example C:\Program Files\tinyPM). You don't need to set such environment variable anywhere. It's used only for the purpose of this documentation.

MySQL

In MySQL you can backup your data using the following command (assuming your database name is tinypmdb):

mysqldump --opt -u root -p --database tinypmdb > tinypmdb.sql

or (if you have gzip tool available):

mysqldump --opt -u root -p --database tinypmdb | gzip -c9 > tinypmdb.sql.gz

All tinyPM's data including the attachments are stored in the database, so it's basically all you need backup to keep your tinyPM data safe.

How to restore when something goes wrong?

mysqldump command creates SQL script, so to restore your database you just need to run the mysql command line tool and runt the backup script:

\. tinypmdb.sql

It will drop your data and recreate it using backup.

HSQLDB

To backup you HSQLDB data all you need to do is to backup data directory contents:

%TINYPM_PATH%/db

This directory should contain three HSQLDB files:

%TINYPM_PATH%/db/tinypm.log
%TINYPM_PATH%/db/tinypm.properties
%TINYPM_PATH%/db/tinypm.script

How to restore when something goes wrong?

Simply overwrite HSQLDB files with those from your backup.

Configuration files

tinyPM 2.0 no longer uses DBCP connection pool dependency. Also to avoid problems with context.xml file during installation
we moved tinyPM settings to properties files:

%CATALINA_HOME%/webapps/tinypm/WEB-INF/classes/hibernate.properties
tinyPM 1.x version stored database connection properties in the resource configuration in:
%CATALINA_HOME%/webapps/tinypm/META-INF/context.xml

So if you're moving from tinyPM 1.x to 2.x you might need to copy your database connection settings into hibernate.properties now.

? If this documentation doesn't solve your problem or has left you with any questions, please don't hesitate to contact us at support@tinypm.com
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.