FYI , I've tried the last part to do something like a snapshot without being able to snapshot ( I tried this on another gear, in order to keep the first one), with no great success, yet not far from it :
1. dump the original working database ( locally, using mysqlworkbench + rhc port-forward, using the "one file" dump mode) of both structure en data
2. create a new gear "aerogearbkp" using the same version thanks to the command :
-
rhc create-app --gear-size medium --no-git aerogearbkp 'https://cartreflect-claytondev.rhcloud.com/github/aerogear/openshift-origin-cartridge-aerogear-push?commit=542b7c3ce494a5dbefd35e6130f345a32204bb76&r=1'
3. once created, checking the gear runs ( and it's ok )
4. stop the aerogear cartridge, while keeping the mysql one up :
-
rhc cartridge stop aerogear-aerogear-push-1.1.0 -a aerogearbkp
5. stop the port-forward from original gear, and starting one to the new gear
-
rhc port-forward -a aerogearbkp
6. alter schema from "aerogear" to "aerogearbkp" in the dump file (probably not necessary if I wouldn't have checked the "create shaema" option for the dump )
7. restore the dump from the file using a new connection in mysqlworkbench ( with identifiers coming from the rhc app-create )
8. do the "pre-snapshot" things on the original gear :
-
rhc ssh aerogear
-
aerogear-push/bin/control pre-snapshot
-
exit
9. create locally a directory and "scp"ing files created in gear's $OPENSHIFT_DATA_DIR ( the token and the standalone.xml copy ) in it.
10. copy those file to the new gear in $OPENSHIFT_DATA_DIR through scp too
11. go to the new gear, and do the post-restore stuff :
-
rhc ssh aerogearbkp
-
aerogear-push/bin/control post-restore
-
exit
12. restart the aerogear cartridge in the new gear
-
rhc cartridge start aerogear-aerogear-push-1.1.0 -a aerogearbkp
13. try to connect to the new app using old gear identifiers => DOES NOT WORK ( does not work either with the default admin / 123 of a new gear)
So, I guess I'm still missing something, yet I still don't know what... please help !
|