[exo-jcr-commits] exo-jcr SVN: r3699 - in jcr/trunk/applications/exo.jcr.applications.backupconsole.dist: bin and 1 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Wed Dec 22 04:16:27 EST 2010
Author: dkuleshov
Date: 2010-12-22 04:16:27 -0500 (Wed, 22 Dec 2010)
New Revision: 3699
Modified:
jcr/trunk/applications/exo.jcr.applications.backupconsole.dist/bin/exobackup.cmd
jcr/trunk/applications/exo.jcr.applications.backupconsole.dist/bin/exobackup.sh
jcr/trunk/applications/exo.jcr.applications.backupconsole.dist/pom.xml
jcr/trunk/applications/exo.jcr.applications.backupconsole.dist/src/main/doc/readme.txt
Log:
EXOJCR-1076: fixed scripts
Modified: jcr/trunk/applications/exo.jcr.applications.backupconsole.dist/bin/exobackup.cmd
===================================================================
--- jcr/trunk/applications/exo.jcr.applications.backupconsole.dist/bin/exobackup.cmd 2010-12-21 14:23:17 UTC (rev 3698)
+++ jcr/trunk/applications/exo.jcr.applications.backupconsole.dist/bin/exobackup.cmd 2010-12-22 09:16:27 UTC (rev 3699)
@@ -1,57 +1,75 @@
-echo off
-if %1 NEQ "-u" goto :help
-set user=%2
-set pass=%3
-set auth=%4
-set host=%5
-SHIFT
-SHIFT
-SHIFT
-SHIFT
-SHIFT
-set comm=%*
+ at echo off
+if NOT "%1" == "-u" goto :help
+shift
+set user=%1
+shift
+if NOT "%1" == "-p" goto :help
+shift
+set pass=%1
+shift
+set auth=%1
+shift
+set host=%1
+shift
-if %auth% == "-b" set newarg="http://%user%:%pass%@%host% %comm%"
-if %auth% == "-f" set newarg="http://%host%/portal/rest form POST /portal/login?username=%user%&password=%pass% %comm%"
+if NOT "%1" == "" (
+set comm=%1
+)
+if NOT "%2" == "" (
+set comm=%1 %2
+)
+if NOT "%3" == "" (
+set comm=%1 %2 %3
+)
+if NOT "%4" == "" (
+set comm=%1 %2 %3 %4
+)
+if NOT "%5" == "" (
+set comm=%1 %2 %3 %4 %5
+)
+if NOT "%6" == "" (
+set comm=%1 %2 %3 %4 %5 %6
+)
-jcrbackup.cmd %newarg%
+if "%auth%" == "-b" (
+jcrbackup http://%user%:%pass%@%host% %comm%
+)
+if "%auth%" == "-f" (
+jcrbackup http://%host%/portal/rest form POST /portal/login?username=%user%^^^&password=%pass% %comm%
+)
-exit
+
+goto :eof
:help
-echo " -u <user> <password> <form_of_authentication> <host:port> <command> "
-echo " "
-echo " <form_of_authentication> : -b - is used for basic authentication "
-echo " -f - is used for form authentication "
-echo " "
-echo " <command> : start <repo[/ws]> <backup_dir> [<incr>] "
-echo " stop <backup_id> "
-echo " status <backup_id> "
-echo " restores <repo[/ws]> "
-echo " restore [remove-exists] [<repo[/ws]>] {<backup_id>|<backup_set_path>} [<pathToConfigFile>] "
-echo " list [completed] "
-echo " info "
-echo " drop [force-close-session] <repo[/ws]> "
-echo " help "
-echo " "
-echo " start : start backup of repository or workspace "
-echo " stop : stop backup "
-echo " status : information about the current or completed backup by 'backup_id' "
-echo " restores : information about the last restore on specific repository or workspace "
-echo " restore : restore the repository or workspace from specific backup "
-echo " list : information about the current backups (in progress) "
-echo " list completed : information about the completed (ready to restore) backups "
-echo " info : information about the service backup "
-echo " drop : delete the repository or workspace "
-echo " help : print help information about backup console "
-echo " "
-echo " <repo[/ws]> : /<repository-name>[/<workspace-name>] the repository or workspace "
-echo " <backup_dir> : path to folder for backup on remote server "
-echo " <backup_id> : the identifier for backup "
-echo " <incr> : incremental job period "
-echo " <pathToConfigFile> : path (local) to repository or workspace configuration "
-echo " remove-exists : remove fully (db, value storage, index) exists repository/workspace "
-echo " force-close-session : close opened sessions on repository or workspace "
-
-
-
-
+echo -u ^<user^> -p ^<password^> ^<form_of_authentication^> ^<host:port^> ^<command^>
+echo.
+echo ^<form_of_authentication^> : -b - is used for basic authentication
+echo -f - is used for form authentication
+echo.
+echo ^<command^> : start ^<repo[/ws]^> ^<backup_dir^> [^<incr^>]
+echo stop ^<backup_id^>
+echo status ^<backup_id^>
+echo restores ^<repo[/ws]^>
+echo restore ^<repo[/ws]^> ^<backup_id^> ^<pathToConfigFile^>
+echo list [completed]
+echo info
+echo drop [force-close-session] ^<repo[/ws]^>
+echo help
+echo.
+echo start : start backup of repository or workspace
+echo stop : stop backup
+echo status : information about the current or completed backup by 'backup_id'
+echo restores : information about the last restore on specific repository or workspace
+echo restore : restore the repository or workspace from specific backup
+echo list : information about the current backups (in progress)
+echo list completed : information about the completed (ready to restore) backups
+echo info : information about the service backup
+echo drop : delete the repository or workspace
+echo help : print help information about backup console
+echo.
+echo ^<repo[/ws]^> : /^<repository-name^>[/^<workspace-name^>] the repository or workspace
+echo ^<backup_dir^> : path to folder for backup on remote server
+echo ^<backup_id^> : the identifier for backup
+echo ^<incr^> : incremental job period
+echo ^<pathToConfigFile^> : path (local) to repository or workspace configuration
+echo force-close-session : close opened sessions on repository or workspace
\ No newline at end of file
Modified: jcr/trunk/applications/exo.jcr.applications.backupconsole.dist/bin/exobackup.sh
===================================================================
--- jcr/trunk/applications/exo.jcr.applications.backupconsole.dist/bin/exobackup.sh 2010-12-21 14:23:17 UTC (rev 3698)
+++ jcr/trunk/applications/exo.jcr.applications.backupconsole.dist/bin/exobackup.sh 2010-12-22 09:16:27 UTC (rev 3699)
@@ -4,7 +4,7 @@
if [ "$1" != "-u" ]
then
-echo " -u <user> <password> <form_of_authentication> <host:port> <command> "
+echo " -u <user> -p <password> <form_of_authentication> <host:port> <command> "
echo " "
echo " <form_of_authentication> : -b - is used for basic authentication "
echo " -f - is used for form authentication "
@@ -41,16 +41,16 @@
fi
user="$2"
-pass="$3"
-host=${5#*"http://"}
-if [ "$4" = "-f" ]
+pass="$4"
+host=${6#*"http://"}
+if [ "$5" = "-f" ]
then
- newargs="http://$host/portal/rest form POST /portal/login?username=$user&password=$pass ${args[@]:5}"
+ newargs="http://$host/portal/rest form POST /portal/login?username=$user&password=$pass ${args[@]:6}"
else
- if [ "$4" = "-b" ]
+ if [ "$5" = "-b" ]
then
- newargs="http://$user:$pass@$host ${args[@]:5}"
+ newargs="http://$user:$pass@$host ${args[@]:6}"
fi
fi
-./jcrbackup.sh $newargs
+./jcrbackup.sh $newargs
\ No newline at end of file
Modified: jcr/trunk/applications/exo.jcr.applications.backupconsole.dist/pom.xml
===================================================================
--- jcr/trunk/applications/exo.jcr.applications.backupconsole.dist/pom.xml 2010-12-21 14:23:17 UTC (rev 3698)
+++ jcr/trunk/applications/exo.jcr.applications.backupconsole.dist/pom.xml 2010-12-22 09:16:27 UTC (rev 3699)
@@ -88,7 +88,7 @@
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
- <id>jar-with-dependensies</id>
+ <id>jar-with-dependencies</id>
<phase>package</phase>
<goals>
<goal>single</goal>
Modified: jcr/trunk/applications/exo.jcr.applications.backupconsole.dist/src/main/doc/readme.txt
===================================================================
--- jcr/trunk/applications/exo.jcr.applications.backupconsole.dist/src/main/doc/readme.txt 2010-12-21 14:23:17 UTC (rev 3698)
+++ jcr/trunk/applications/exo.jcr.applications.backupconsole.dist/src/main/doc/readme.txt 2010-12-22 09:16:27 UTC (rev 3699)
@@ -43,7 +43,7 @@
exobackup.sh and exobackup.cmd - suitable for use with GateIn based products like Platform
- -u <user> <password> <form_of_authentication> <host:port> <command>
+ -u <user> -p <password> <form_of_authentication> <host:port> <command>
<form_of_authentication> : -b - is used for basic authentication
-f - is used for form authentication
More information about the exo-jcr-commits
mailing list