Skip to content

Instantly share code, notes, and snippets.

View oscardelgado's full-sized avatar

Óscar Delgado Santamaría oscardelgado

View GitHub Profile
@oscardelgado
oscardelgado / gist:fa2138572b8f890f1d17a0b4bc416a93
Last active March 14, 2018 08:59
How to upload a backup of your MySQL BD in OpenShift 3 to your Dropbox account
Based on https://medyo.github.io/2017/backup-openshift-database/ (was for OpenShift 2)
See https://github.com/andreafabrizi/Dropbox-Uploader
Steps:
1 - Create new Dropbox App and get the token
Create A new Dropbox App Through Dropbox Developers
Select Dropbox API -> App Folder then name your app
Once created, Go to Generated access token section and click generate
<%@page import="java.sql.*, javax.sql.*, javax.naming.*"%>
<%--
Simple test to check if the connection to a database is working.
Steps:
- Starting with a new Openshift Jboss app, using the Openshift web console, add a DB. For example, PostgreSQL 9.2.
(you can also use command-line. For example: rhc-ctl-app -a <application-name> -l <email-id-we-used-to-register> -e add-mysql-5.1 )
It will not use any extra gears.
- You can check the datasources, already declared for JBoss, in: .openshift/config/standalone.xml (hidden folder).
In this example, we will use the datasource with name "PostgreSQLDS". Openshift has internally enabled it in the previous steps.