Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
Usage: move-everything.sh [--version] [ -f | --force ] \
	[-exclude-users user,user,..] [-nousers]
	from-username from-password from-repo-URL \
	to-username to-password to-repo-URL

...

Code Block
Usage: move-everything.sh [--version] [ -f | --force ] \
	[-exclude-users user,user,..] [-nousers]
	--from-snapshot directory --from-prefix from-prefix \
	to-username to-password to-repo-URL

...

If you specify the --nousers option (has no value), this turns off explicit copying of user accounts entirely. Note that users' RDF metadata will still get copied, because it is in one of the named graphs which gets moved and transformed. There will just be no login accounts. Also note this allows you to run move-everything without an Administrator login at the source repo, since all you need is read access to all the graphs - that does not necessarily require Administrator access.

The --from-snapshot and --from-prefix options must be specified together. They select the input data from a directory of serialized files, in the same format as produced by the make-snapshot script. The value of --from-snapshot is the path to the direcotry containing the RDF serialization files. The value of -from-prefix is the exact and complete URI prefix (including the trailing '/') of the repo that generated the dump in the directory. This is necessary because the script does not ahve access to that repository to query it for its prefix.

...

Code Block
move-everything.sh bigbird PASSWORD https://harvard.eagle-i.net \
bigbird PASSWORD https://localhost:8443

...

Code Block
make-snapshot bigbird PASSWORD https://harvard.eagle-i.net \
harvard.monday


move-everything.sh -f \
--from-snapshot harvard.monday \
--from-prefix http://harvard.eagle-i.net/i/ \
bigbird PASSWORD https://localhost:8443

...

Code Block
Usage: move-resources [-verbose] [-replace]
	[--type published|workspace]
	{ --file source-file --prefix uri-prefix | --source source-repo-url url 
	--user login:password --graph src-		graph-URI }
	dest-repo-url dest-login:dest-password dest-graph-URI



(options may be abbreviated to first letter, e.g. -f)

...

Code Block
move-resources -s https://qa.harvard.eagle-i.net:8443 -u bert:ernie \
-g http://eagle-i.org/ont/repo/1.0/NG_Published https://localhost:8443 \
root:password http://eagle-i.org/ont/repo/1.0/NG_Experimental



Moved 4694 data statements and 322 metadata statements.

...

  1. Discover your machine's primary IP address and set the ADDR shell variable: (Note that this assumes eth0 is your primary network interface --use ifconfig -a to see them all)
    Code Block
    ADDR=`ifconfig eth0 | perl -ne 'print "$1\n" if m/\sinet addr\:(\d+\.\d+\.\d+\.\d+)\s/;'`
  2. Run these iptables commands to redirect all port 80 requests to port 8080.
    Code Block
    iptables -t nat -A OUTPUT -d localhost -p tcp --dport 80 -j REDIRECT --to-ports 8080iptables8080
    iptables -t nat -A OUTPUT -d $ADDR -p tcp --dport 80 -j REDIRECT --to-ports 8080iptables8080
    iptables -t nat -A PREROUTING -d $ADDR -p tcp --dport 80 -j REDIRECT --to-ports 8080
  3. (If using SSL) Run these iptables commands to redirect all port 443 requests to port 8443.
    Code Block
    iptables -t nat -A OUTPUT -d localhost -p tcp --dport 443 -j REDIRECT --to-ports 8443iptables8443
    iptables -t nat -A OUTPUT -d $ADDR -p tcp --dport 443 -j REDIRECT --to-ports 8443iptables8443
    iptables -t nat -A PREROUTING -d $ADDR -p tcp --dport 443 -j REDIRECT --to-ports 8443
  4. Save the rules in the canonical place to be reloaded on boot:
    Code Block
    iptables-save > /etc/iptables.rules
  5. Create a script to be run by the network startup infrastructure that will reload the iptables whenever the network is configured on:
    Code Block
    cat << EOF > /etc/network/if-pre-up.d/iptablesload
    #!/bin/sh
    iptables-restore < /etc/iptables.rules
    exit 0
    EOF
  6. Test by accessing your server both locally and remotely by the port-80 URL. Then reboot the machine and try it again to be sure the iptables commands are run correctly on boot.

...