root/trunk/calendar3/deployment/dumprestore/shellscr/resources/dumpres.sh

Revision 463 (checked in by douglm, 7 years ago)

Mostly Dump/restore changes

Further schema changes - renamed calendar path column to bwpath

alter table CALENDARS alter column path rename to bwpath

Added ownerid column and index and publick to attendees

alter table ATTENDEES add column ownerid int
alter table ATTENDEES add column publick char(1)
CREATE INDEX vattendees_user ON attendees (ownerid)

Changed CalOptions? to support extra classes and fix bugs.

Moved system parameters into xml options.
Moved dump/restore runtime options into xml options.

Removed use of bedework.dumprestore.options file. Multiple files just lead to
confusion and the zipped version will eventually allow overrides as run time
parameters.

Many changes to deployment build files to build dump/restore applications as
zipped runnable packages

Disabled (for the time being at least) the targets which run the dump/restore
applications. For the moment cd into the temp directory and run it, e.g.

cd quickstart/calendar3/temp/shellscr/dumpres/
chmod +x cmd
./cmd restore ~/.bedework/caldata.xml

or unzip the zipped application that is in the dist directory.

The zipped application will handle dump, restore, initdb and has a backup option
to save the data in a file with a date tagged name.

Dump new attendee fields.

Still to do:
Check attendees restored correctly

Ensure all fields are dumped and restored
Use subscription name in view dump instead of id.

Use the event key fields instead of id for annotation target and master.

Not dumping preferred calendars in version3.0 - do so.

Need to set calType in 2.3 restore

EventAnnotations? still need work. target and master need setiing.

Line 
1 #!/bin/sh
2
3 # Run the bedework dump/restore program
4 # First arg defines the action, dump, restore etc
5 # Second arg should be the filename
6
7 # JAVA_HOME needs to be defined
8
9 cp=@CP@
10
11 DUMPCMD="$JAVA_HOME/bin/java -cp $cp @DUMP-CLASS@"
12 RESTORECMD="$JAVA_HOME/bin/java -cp $cp @RESTORE-CLASS@"
13
14 APPNAME=@BW-APP-NAME@
15
16 case "$1" in
17   dump)
18     echo $DUMPCMD -appname $APPNAME -f $2 $3 $4 $5 $6 $7 $8 $9
19     $DUMPCMD -appname $APPNAME -f $2 $3 $4 $5 $6 $7 $8 $9
20     ;;
21   restore)
22     echo $RESTORECMD -appname $APPNAME -f $2 $3 $4 $5 $6 $7 $8 $9
23     $RESTORECMD -appname $APPNAME -f $2 $3 $4 $5 $6 $7 $8 $9
24     ;;
25   backup)
26     TARGET=$2/$3`date +%Y%m%d_%H%M%S`.ldif
27     echo $DUMPCMD -appname $APPNAME -f $TARGET
28     $DUMPCMD -appname $APPNAME -f $TARGET
29     ;;
30   initdb)
31     echo $RESTORECMD -appname $APPNAME -f ./data/initbedework.xml -initSyspars
32     $RESTORECMD -appname $APPNAME -f ./data/initbedework.xml -initSyspars
33     ;;
34   *)
35     echo $"Usage: $0 {dump <filename>|restore <filename>|backup <directory> <prefix>} || initdb"
36 esac
37
Note: See TracBrowser for help on using the browser.