Openshift > MySQL dump with crontab
Author: Anastasia Panchenko
Aug. 18, 2014, 12:35 a.m.

This article assumes that you have already rhc client installed on your local machine. If it's not, you can read about it here.

1. Adding crontab cartridge to you application

Login into openshift and choose your application. Click on "Or, see the entire list of cartridges you can add" link and add Cron cartridge.

2. Creating folder for backups on server

Run command 

$ rhc domain show

and find Git URL line, e.g.:

Git URL: ssh://accesscode@myapp-mydomain.rhcloud.com/~/git/myapp.git/

Use only inner part of URL for ssh connection and type:

$ ssh accesscode@myapp-mydomain.rhcloud.com

$ mkdir $OPENSHIFT_DATA_DIR/BACKUPS

Than press Ctrl+D to unlink from server.

3. Adding dumping script to openshift

Go to your application folder on local machine and find for folder .openshift. We will create script which will be run ones per week. You can also use other option from here.

$ cd ~/my-app

Run following commands:

$ mkdir .openshift/cron && cd .openshift/cron

$ mkdir weekly && cd weekly

Now you you need to create bash script for database dumping:

$ vi mysqldump.sh

In file insert the next:

#!/bin/bash
BACKUP_NAME=$(date +'%d_%m_%Y')_${OPENSHIFT_GEAR_NAME}
mysqldump --password=${OPENSHIFT_MYSQL_DB_PASSWORD} -u ${OPENSHIFT_MYSQL_DB_USERNAME} -h ${OPENSHIFT_MYSQL_DB_HOST} -P ${OPENSHIFT_MYSQL_DB_PORT} ${OPENSHIFT_GEAR_NAME} > ${OPENSHIFT_REPO_DIR}/data/${BACKUP_NAME}.sql

$ sudo chmod +x mysqldump.sh

Then save the file.

Type

$ git add .openshift/cron/weekly/mysqldump.sh

Commit changes and push it to the openshift.

Thats it. To check your script work, you can connect to openshift server via ssh and view all your backups in BACKUPS folder in your data directory.

dump
cron
mysql
openshift
Viagra Online Australia Quel Est Generique Kamagra [url=http://costofcial.com]cialis online[/url] No Prescription Needed Free Trial Viagra Sample 40 Viagra For 99.00 Pdr Side Effects Rare For Amoxil Chewable Kamagra cialis Discount Acticin Store Cheapest Generic Levitra No Pres Commander Kamagra Cialis 10 Mg Viagra Wirkung Forum Priligy Belgique http://costofcial.com - online pharmacy Express Ship Non Prescription Viagara Blading Propecia Viagra Al Supermercato
using viagra in 20s [url=http://viagrabs.com/]http://viagrabs.com/[/url] afbeelding viagra pil buy viagra online brand and generic names of viagra
cialis 20 mg every day buy viagra without prescription pharmacy online cheap viagra without prescription walmart viagra prices without insurance http://thebestofsexology.com/#cialis viagra or cialis without a prescription [url=http://thebestofsexology.com/#20mg]cialis 20 mg side effects[/url] canada rx viagra without prescription http://thebestofsexology.com/#buy-cialis
[url=http://psychologytweets.com]cialis price[/url] buy cialis uk http://psychologytweets.com
[url=http://bullsac.com]is it safe to buy levitra online[/url] how long before levitra works http://bullsac.com
[url=http://bullsac.com]which works better viagra or cialis or levitra[/url] daily levitra http://bullsac.com
10 under rated nu metal riffs you ve forgotten all about! mp3 converter free download
[url=http://rabbitinahat.com]cialis tab[/url] cialis 20 mg reviews http://rabbitinahat.com
[url=http://missreplicawatches.com]buy real cialis online[/url] cialis effects http://missreplicawatches.com
[url=http://gigawatt6.com]cheapest prices for cialis[/url] cialis stopped working http://gigawatt6.com
[url=http://gigawatt6.com]how much is cialis without insurance[/url] mixing cialis with viagra http://gigawatt6.com
[url=http://mphasset.com]can you mix viagra and alcohol[/url] viagra recreational http://mphasset.com
[url=http://istanbulexpressonline.com]how to order viagra online[/url] viagra savings card http://istanbulexpressonline.com
[url=http://bakerssign.com]levitra prices canada[/url] levitra 10 http://bakerssign.com
[url=http://rabbitinahat.com]cialis effective dose[/url] cheap cialis tablets http://rabbitinahat.com
Charly Lownoise & Mental Theo - Hardcore Feelings war mp3 download
[url=http://gigawatt6.com]cialis 80 mg price[/url] how often take cialis http://gigawatt6.com
[url=http://psychologytweets.com]cialis 30 mg dose[/url] canadian pharmacies for cialis http://psychologytweets.com
[url=http://psychologytweets.com]how fast does cialis work[/url] cialis medication http://psychologytweets.com
[url=http://istanbulexpressonline.com]how old do you have to be to get viagra[/url] viagra grapefruit juice http://istanbulexpressonline.com
[url=http://rabbitinahat.com]cost of cialis with insurance[/url] cialis for prostate problems http://rabbitinahat.com
Buy Cheap Cialis we recommend cialis next day generic cialis cialis fminin tout sur le cialis cialis 5mg price online cialis ireland cialis canada only today cialis sale buy cvs cialis sales generika cialis cavert buy cialis no prescription click now phizer cialis cialis 20 mg where to buy pfizer cialis comprar cialis argentina cialis invention cialis super active uk eu cialis 20 is 100mg cialis too much 110 mg dissolvable cialis look there cialis canadian [url=http://shandatea.com/]cialis price[/url] inquiry cialis cialis buy cialis generique buy cialis pill priligy with cialis active super cialis http://shandatea.com/
side pink viagra [url=https://viagracheapoi.com/]viagra cheap[/url] viagra online viagra 100mg australia
online cialis viagra [url=https://viagracheapoi.com/]buy viagra[/url] buy viagra the best site overnight viagra
viagra a andorre [url=http://viagraindiagsy.com/]buy viagra[/url] online viagra generic viagra verkauf
viagra online cheapest [url=http://viagraindiagsy.com/]viagra online[/url] buy viagra viagra ed
follow link cheap viagra order [url=http://viagraeasygs.com/]buy viagra[/url] viagra cheap desi viagra
cialis und doxycyclin [url=http://cialisuqlonline.com/]cialis[/url] online pharmacty cialis cialis und doxycyclin
cialis quanti m [url=http://cialisuqlonline.com/]cialis online pharmacy[/url] buy cialis we use it generic cialis
achat du viagra au maroc [url=http://viagracanadaqw.com/]buy viagra[/url] cheap viagra where can i buy 100mg viagra
buy cheap generic viagra us [url=http://viagrarqwcanada.com/]buy viagra[/url] buy viagra viagra how long does it take
can i buy viagra in leeds [url=http://viagrarqwcanada.com/]buy viagra[/url] buy viagra costo cialis viagra
Cheap Cialis cialis en mexico precio how to buy cialis online usa cialis generico en mexico cipla cialis online order a sample of cialis cialis ahumada buy cialis no prescription wow look it cialis mexico il cialis quanto costa acquisto online cialis usa cialis online [url=http://shandatea.com/]cialis price[/url] cialis dosage amounts cialis 5 mg para diabeticos link for you cialis price acheter cialis meilleur pri http://kaivanrosendaal.com/
cialis 20 mg generic precio cialis madri buy cialis bradford price cialis spain cialis moins cher lyon insurance pays for cialis view site best price on cialis 20mg only now cialis sale cheap wow look it cialis best peice price cialis spain acheter pas cher cialis jelly cialis sales u buy cialis online [url=http://ph2oc.com/#buy-cialis]cheap cialis 20mg pills[/url] preis cialis generika ou trouver du cialis pas cher brand name cialis vs generic cialis next day cialis natural femenina cialis costs per pill http://ph2oc.com/#buy-cialis
cialis online coupon cialis ohne rezept review cialis australia express can cialis shipped canada cialis tab 20mg x 8 generic cialis safe anchor cialis 20mg price at cvs free coupon for cialis only now cialis injectable cialis store in dubai 50 cialis buy cialis rezeptfrei vergleich cialis review 50mg cialis vs cialis cialis in sterreich cialis canada achat order cheap cialis deals [url=http://just4meandu.com/#coupon-2018]coupon code for cialis[/url] cheap generic super cialis cialis kopen apotheek cialis price http://just4meandu.com/#coupon-2018
eli lilly cialis coupon schweiz cialis verkaufen cialis comprar barato cialis invention coupure de la pilule cialis gilf uses cialis tadalafil 20 mg cialis pharmacy coupon farmacias en lnea cialis only for you cheaper cialis cialis generic versus brand cialis nebenwirkungen forum generac for cialis cyalis different cialis commercials extenze used with cialis cialis super active reviews [url=http://just4meandu.com/#buy-cialis]Cialis Coupon[/url] 2 waysto takecialis for ed cialis generika billig cialis buy http://just4meandu.com/#cialis
cialis generico doc on line where to buy cialis and cialis comparatif cialis com Cialis Cheap Buy Online cialis discount canada mexico kaufen sie cialis onlinepreis cialis online sales http://kaivanrosendaal.com/#Buy-Cheap-Cialis
buy levitra online cheap walgreens price for cialis i recommend cialis generico american pharmacy cialis cialis rckenschmerzen cialis e hiv we recommend cialis info [url=http://theitchblog.com/#Levitra-20mg]overnight delivery buy levitra online[/url] cialis herbs only here cialis pills http://theitchblog.com/#buy-online
buy cialis online without prescription buy link viagra withoutbest place to buy viagra online without prescriptionreal viagra without a script viagra from canada without prescriptiongeneric viagra without prescriptionsviagra without perscriptions levitra 20mg cheapest price viagra 100mg price without rxbuy viagra without prescviagra online without persciption [url=http://ryangikas.com/#no-Prescription]buy cialis online uk no prescription[/url] viagra without a prescription ontario canadaorder viagra online without a prescriptionviagra online without rx http://cottagegroveresources.com/#20-mg
buy cialis 20mg online viagra without perscriptionviagra uk without prescriptionviagra from canada without prescription viagra online without rxviagra without prescription onlinebuy viagra online without buy cialis with no prescription buying viagra without a perscriptionreal viagra without a scriptviagra without a prescription [url=http://cottagegroveresources.com/#20-mg]buy levitra 20mg online[/url] viagra for sale without a prescriptionviagra without presciptioncheap viagra without subscription http://cottagegroveresources.com/#Buy-Levitra-20-mg
buy cialis 20mg fda approved pharmacy viagra without edphiser viagra without perscriptiononline viagra without prescription viagra available online without prescriptioncheap viagra without prescriptionviagra without prescription uk buy levitra 20mg usa buy viagra without a prescriptionviagra without a prescirptioncheap viagra online without a script [url=http://versesproject.com/#buy-cialis-20mg]buy cialis online 20mg[/url] purchase viagra without precriptionviagra in canada without prescriptionviagra without a script http://versesproject.com/#20mg-cialis
can i buy cialis without a prescription online prescription viagra withoutbuying viagra without a scriptviagra without presc cost for viagra without insurance 283viagra without prescription in ukreal viagra without a script buy levitra 20mg canadian viagra without prescriptionbuy viagra online without a credit cardviagra online without a perscription [url=http://versesproject.com/#20-mg]buy cialis online 20mg[/url] buying viagra without prescriptionviagra 20 mg for purchase without rxget viagra without prescription http://versesproject.com/#buy
viagra pills without a prescription viagra without a scriptviagra available online without prescriptioncanada rx viagra without prescription cialis canada generic viagra online without prescriptiongeneric prescription viagra withoutget viagra without a prescription [url=http://lamarme.com/#cialis-20-mg]20mg cialis[/url] http://cooksbestfoods.com
buy viagra without a prescription viagra online without prescriptionviagrawithoutprescription.uspurchase viagra without prescription visit your url viagra online without prescription ukpoland viagra without prescriptionviagra without prescription in canada [url=http://cooksbestfoods.com/#buy-viagra-without-prescription]original viagra without prescription[/url] http://lamarlandscaping.com
calais viagra without a presviagra pills without a prescriptionbuy viagra without credit card cialis 20mg prix en pharmacie buy viagra without consultationviagra without subscription fastgeneric viagra without prescription [url=http://cooksbestfoods.com/#buy-viagra]free trial viagra without prescriptions[/url] http://blackhawkdowns.com
canadian online pharmacy generic cialis buying viagra without prescriptionviagra or cialis without a prescriptionbuying viagra without a prescription buy cialis from canada online free viagra samples without purchaseviagra without a rxbuy viagra without consultation [url=http://theartofditko.com/#cialis]cialis 20mg tablets price in pakistan[/url] viagra online without prescriptionwithout prescription viagraviagra usa without a prescription http://secret-identity.net/#Cheap viagra without insurancebuy viagra online withoutgeneric viagra without perception
cialis sale uk [url=http://cialisbuyap.com/]generic cialis[/url] cialis cialis how much
visit web site cheap cialis uk [url=http://cialisbuyap.com/]cialis online[/url] cialis cialis online vancouver
como comprar cialis en espa [url=http://cialisbuyap.com/]cheap cialis[/url] cialis indian generic soft cialis
cialis 5 mg quanto costa [url=http://cialisbuyap.com/]indian cialis[/url] indian cialis cialis 10 indicazioni
buy viagra 100 [url=https://viagracheapoi.com/]viagra cheap[/url] viagra cna u buy viagra in the usa
forum cheap generic viagra [url=http://viagraindiagsy.com/]viagra cheap[/url] cheap viagra real viagra in canada
Whatever has transformed drastically in the past couple of decades. The cialis paypal canada growth of web marketing as well as shopping has enhanced the financial arms of humans. The on the internet Canadian Drug store is among the countless elements which [url=http://canadianpharmacyextra.com/]Pharmacy[/url] has established within this network. It has actually completely taken away the drug store industry by storm all over the world and also changed the whole circumstance upside-down. Right now, individuals are avoiding import of medication from the community pharmacies and making the most of the web service far more quickly. The on-line medicine stores are cheap; prescriptions may be called for as well as they have obtained in-house doctors in order to recommend medicine based on our demands. This setup of commerce is thoroughly utilized by the north American and Western consumers.
which generic viagra is best [url=http://viagraindiagsy.com/]buy viagra[/url] online viagra how little viagra can you take
viagra uk overnight shipping [url=http://viagraeasygs.com/]viagra[/url] online viagra buy viagra in chatsworth
cialis 20 mg generic viagra without consultation uk buy generic viagra online without prescription get viagra without doctor costo del cialis 20 mg farmacia us viagra without prescription [url=http://thebestofsexology.com/#cialis]secure tabs online cialis 20 mg[/url] brand viagra without a prescription http://thebestofsexology.com/#cialis-20mg
Cialis online viagra without perception buy viagra without a prescription Buy Cialis Online viagra without rx [url=http://cialisfurr.com/#cialis]Buy Cialis 20 mg[/url] viagra without see a doctor http://xcialisxx.com viagra without prescription new york
venta de cialis en linea [url=http://cialispharmacybuyt.com/]generic cialis[/url] generic cialis only now find cheapest cialis
Buy Cialis Online viagra without a script buy viagra online without prescription Cheap Cialis viagra without prescription in uk [url=http://cialistlm.com/#cheap]Buy Cheap Cialis[/url] viagra online without perscription http://cialisfurr.com generic viagra online without prescription
payday loans port angeles wa [url=http://paydayadvancet.com/]pay day loans online[/url] cash advance new pay day loan lenders
emergency food loans [url=http://paydayadvancet.com/]payaday loans[/url] payday loan american cash advance mccomb ms
Cvs Pharmacy It is not vital that a Canadian pharmacy online sticks to [url=http://cvspharmacycanadian.com/#cvs-pharmacy-silver-spring-md]cvs pharmacy dalton ga[/url] all the quality standards set by the Canadian regulatory authorities. Of the thousands of on-line pharmacies cvs pharmacy san diego operational in the nation, only a few are authentic and also have the necessary licenses. As mentioned prior to the license for offering drugs is offered by the rural authorities. So the first thing one ought to do is to examine whether the pharmacy is registered and has the necessary licenses. If of course, the certificate and also registration number must be plainly displayed on the Canadian pharmacy online internet site.
cialis without a prescription cialis tablets cialis side effects average cost of cialis prescription cialis us buying cialis cheapest cialis online cialis vs viagra can you buy viagra without a doctor's prescription cheap cialis without prescription buy levitra without a prescription buy cialis without prescription cialis over the counter at walmart best ed medicine can i buy viagra without a prescription cialis 20mg coupons cialis without a doctor's prescription from canada [url=http://lowest-price-canadian-cialis.com/]buy cialis[/url] cialis 10 mg
Buy Cheap Cialis Online cheap viagra online without a script free viagra samples without purchase Cheap Cialis Online viagra without insurance [url=http://xcialisxx.com/#buy-cialis]Buy Cheap Cialis Online[/url] viagra without see a doctor http://cialisfurr.com viagra without a doctor prescription
The world of job has actually certainly altered a lot in the last few years. Outsourcing and also pharmacies raising quantities of joblessness have brought about wonderful turmoils as well as adjustments in the office. Even [url=http://topratedcanadianpharmaciesonline.com/]recommended reading[/url] those that are still gainfully used typically discover themselves examining their shoulders waiting on the axe to fall. So, exactly how can people locate the right profession? While no job is a 'certainty,' they can plan for a sought-after, apparently bulletproof job such as pharmacy technician. ordering drugs online
Cheap Cialis buy online prescription viagra without viagra without script Cialis online buy viagra without email address [url=http://cialisfurr.com/#cialis]buy cialis without prescription[/url] viagra without a prescription ontario http://cialisfurr.com buying viagra without a script
Buy Cheap Cialis Online buying viagra without a perscription viagra 100mg without prescriptions buy cialis without prescription viagra very expensive without insurance [url=http://cialistlm.com]Cheap Cialis[/url] viagra without prescriptions http://cialistlm.com/#cheap free viagra without prescription
viagra 20 mg for purchase without rx http://www.pickandclick.info/redirect.php?url=http://phonecluster.org buy viagra without a prescription pfizer viagra without prescription http://center.wachef.com/link.php?url=https://http://golforia.com buying viagra without prescription viagra without buy prescription http://swook.ru/go/url=http://thefreaktones.net viagra without prescriptions
viagra without rx http://www.nlacrc.com/redirect.aspx?url=http://planetzeta.com viagra without a doctor taking viagra without erectile dysfunction http://www.inregistrare-domenii-ro.com/redirect.php?link=http://golforia.org free viagra samples without purchase cheap viagra online without a script http://kerivnyk.info/go.php?url=http://tripsnacks.com buy viagra without scrip
viagra purchase without perscription us pharmacy http://www.vacline.com/catalog/mobile/redirect.php?action=url&goto=http://debuggingyourlife.com viagra for sale without a prescription viagra online without prescriptions http://megazakupashki.ru/redirect.php?url=http://golforia.org viagra online without prescription viagra without see a doctor http://www.sxqing.com/link.php?url=https://http://thefreaktones.net generic viagra without prescriptions
viagra from canada without prescription https://www.yeyun.com/redirect?url=http://thefreaktones.org buy viagra without prescription cost of viagra without insurance http://railway.turizm.ru.vv3.kz/go.php?url=http://lydianorris.com price of viagra without insurance buy real viagra without a prescription https://www.77shw.com/wp-content/themes/begin/inc/go.php?url=https://http://debuggingyourlife.com viagra for sale without prescription
brand viagra without prescription http://oop.com.cn/index.php?m=comment&c=index&a=init&commentid=content_43-53174-1&title=%E7%94%A8ASP%E8%AE%BE%E8%AE%A1%E4%B8%80%E4%B8%AA%E7%95%99%E8%A8%80%E8%96%84&url=http://1053ivylane.com cheap viagra without prescription generic viagra without prescriptions https://evolpcgaming.com/index.php?app=core&module=system&controller=redirect&url=https://http://freaktones.org order viagra online without a prescription order viagra without rx online http://www.federaltimes.com/ads/dfp.jsp?tag=/114235265/FederalTimes/Skyscraper&pos=mid&width=300&height=600&url=http://thefreaktones.org buy pill prescription viagra without
purchase viagra without prescription http://literarky.parlamentnilisty.cz/noveknihy/url.php?url=https://http://innertotality.net viagra without prescription. viagra without prescription 400 mg http://motorcycles.goldenarticles.net/go.php?url=http://cheezythemouse.com viagra pills without a prescription viagra without prescription http://tu.fav123.net/go.php?url=http://thefreaktones.com buy viagra online without a prescription
viagra without prescription canada http://benglory.top4cats.ru/scripts/redirect.php?url=http://camdroid.com viagra without prescriptions uk buy link viagra without https://www.pevilart.com/guestbook/go.php?url=http://jamspaced.com viagra without seeing a doctor get viagra without seeing a doctor http://www.family-travel-scoop.com/cgi-bin/counter.pl?url=https://http://tripsnacks.com viagra 100mg without prescriptions
viagra without perscription http://ddb.blogoda.ru/go.php?url=http://golforia.com buy viagra without credit card get viagra without a prescription http://www.concursoman.ro/views/main/participa.php?url=https://http://unclejam.com purchasing viagra without prescription brand viagra without prescription http://home.robotedu.org/link.php?url=http://planetzeta.com viagra without a prescirption
viagra without presciption http://www.allanville.com/aviation_charts/goto.php?url=http://thefreaktones.com generic viagra without rx free viagra samples without purchase http://centuryheli.fr/jws/redirect.php?action=url&goto=http://camdroid.com viagrawithout a prescription viagra pills without a prescription http://uk.handygames.com/goget?url=https://http://tripsnacks.com viagra without prescription usa
viagra without side effects http://www.824bmw.com/www_wzzj_net/go.php?url=http://phonecluster.net super viagra without prescriptions buy viagra without the prescription http://casininfo.awardspace.com/go.php?url=http://phonecluster.net buying viagra without a prescription viagra without prescription 400 mg http://ketnoi123.com/redirect.php?http://1053ivylane.com buy viagra without credit card
[url=http://baymontelreno.com]cialis recreational[/url] can cialis cause depression http://baymontelreno.com
[url=http://mphasset.com]when to use viagra for best results[/url] viagra without perscription http://mphasset.com
[url=http://mphasset.com]viagra and angina[/url] viagra without a prescription http://mphasset.com
[url=http://mphasset.com]price of viagra[/url] i need viagra http://mphasset.com
[url=http://rabbitinahat.com]everyday cialis[/url] cialis alternatives http://rabbitinahat.com
[url=http://psychologytweets.com]buy cialis online without prescription[/url] cialis 24 hours http://psychologytweets.com
[url=http://rabbitinahat.com]instructions for taking cialis[/url] how long does it take for cialis to work http://rabbitinahat.com
[url=http://mphasset.com]when to take viagra pill[/url] uk viagra online http://mphasset.com
[url=http://mphasset.com]daily viagra dosage[/url] viagra penis http://mphasset.com
[url=http://gigawatt6.com]does cialis expire[/url] cheap cialis super active http://gigawatt6.com

Leave a comment:

Name
Python
Web development
Review Linux
Administration
Provisioning CVS
Windows AWS
Continuous Integration
NoSql Logging Web Servers FileSystems Scala
accurev ansible apach2 apache api application approaches architecture archivation argparse arguments artifactory automation awk aws backup bash batch-scripting beaver block build built-in caching call captcha cartridge case certificates cgi chain client cloud cloudformation cluster cmd coding collections command-line commands compression conditionals conversion convert cookbook copy counter cron crud css cut cygwin daemon datatype date dd debpackage decorator delattr deploy deque dict distributed-file-systems django DNS domain driver dropbox dump elasticcache elasticsearch encryption exit ext4 extra-tags failover file filename filters for form format freetds functions gerrit getattribute gid git globals glusterfs hardware hook iam indexing inheritance init install job-interview jquery ldap linux list locals logging logs logstash lookup magicmethods mail main-menu metadata metalogger mongodb moosefs mount mssql multiplatform multithreading mysql netcat nginx nosql open-ssh openldap openshift os packaging parse partition path pattern patterns permissions pid pil pip pipe playbook pool post post-commit processes production provisioning proxy putty python python-mysql recursively redirection redis register replication repr restore return review rotation scala script search selenium server setattr settings setup shipper signals singleton slots snapshot socket splunk ssh ssh-key ssl storage str string style subprocess sugar super switch syntactic syntaxhighlighter systeminfo tail tar templatetags time tls tune2fs tuple ubuntu unicode unique unix unixodbc usage usecases uuid uwsgi variable vars version vi virtualenv volume web web-server windows with_items __getattr__