Dave Levy | 27 Oct 16:54

Backing up a .war version from the command line.

I have installed snipsnap 1.02b uttoexeter .war running under tomcat 
V4.13 on a Cobalt Qube Linux 2.2.16C37_III. I have redirection working 
on my apache 1.3 web server.

I am looking to use the utilities to automate the backup of the database 
which is mounted on files.

My first problem is that snipsnap-utils.jar is missing. I have 
downloaded snipsnap-utils.jar from the non .war version of 1.02b. When I 
try to run it I get the following errors. I have copied the other apache 
.jars to the tomcat lib directory from the 1.02b lib directory.

SnipSnap AdminClient ($Revision: 1731 $)
Copyright (c) 2000-2005 Fraunhofer Gesellschaft
Fraunhofer Institute for Computer Architecture and Software Technology
All Rights Reserved. See License Agreement for terms and conditions of use.
Responsible Authors: Stephan J. Schmidt, Matthias L. Jugel.
Contacting Remote Server ...
Exception in thread "main" java.lang.NoClassDefFoundError: 
org/apache/commons/codec/EncoderException
    at 
org.apache.xmlrpc.DefaultXmlRpcTransport.setBasicAuthentication(Unknown 
Source)
    at 
org.snipsnap.server.AdminXmlRpcClient.<init>(AdminXmlRpcClient.java:52)
    at 
org.snipsnap.server.AdminXmlRpcClient.<init>(AdminXmlRpcClient.java:45)
    at org.snipsnap.server.AdminClient.execute(AdminClient.java:146)
    at org.snipsnap.server.AdminClient.main(AdminClient.java:59)

The script I am using is as follows

#!/bin/sh

JAVA_HOME="/usr/java/j2sdk1.4.2_04"
PATH=${PATH}:${JAVA_HOME}/bin
APP_HOME=/usr/local/tomcat/webapps/snipsnap
APP_LIB=${APP_HOME}/WEB-INF/lib

set CLASSPATH; for jar in ${APP_LIB}/*.jar
do
    CLASSPATH=${CLASSPATH}:$jar
done

export JAVA_HOME PATH CLASSPATH

SnipsnapHost="http://192.168.1.99:8080/"
BackUpFile="mysnipsnapdump.snip"

java -classpath ${CLASSPATH} \
    -jar WEB-INF/lib/snipsnap-utils.jar \
    -url ${SnipsnapHost}                  \
    -user "realadminusername" -password "realpassword"  \
    snipSnap.dumpXml > ${BackUpFile}

I realise the problems could be in a number of places, but could someone 
given me some pointers and help. NB I am running this from $APP_HOME.

--
Dave

David Levy

Private & Confidential: This e-mail is intended for the addressee only. 
If you are not an addressee, you have no rights to use the information 
contained in this letter. Please destroy and notify me that an error 
delivery has occurred.

Gmane