Below are some tips and tricks I found useful while working with the SMF backups (and
MySQL database files in general).
- SSL: If your website is using a self-signed certificate that your JVM does not trust, you have to
create new keystore with the server certificate(s) which you then have to
copy to your java.home/jre/lib/security folder. Otherwise you will get an exception : "sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"
For an easy way on how to do add a new keystore, please check http://blogs.sun.com/andreas/entry/no_more_unable_to_find
If you have more Java SDKs installed on your system, you can find the one that was used to start the application by checking the About box.
Do not forget, you need to put the keystore into the java.home/jre/lib/security folder.
- If using MySQL and you need to import an .sql file of a database
containing UTF-8 encoding, please remember to use the
--default_character_set utf8
option on the mysql command line.
Example:
mysql -u <username> -p --default_character_set utf8 <database_name> < <script.sql>
- Text editor to use when checking huge text files: vi
There's a vi for Windows too: http://www.vim.org/download.php#pc
(sorry emacs aficionados, my text edditing in linux is sporadic, so I stick with vi)
If you get an SQL error on line <hundreds of thousands> like I did, just type
:<line> and press Enter. You should be taken to that line.