Sponsored Content
Top Forums Shell Programming and Scripting CRON Job to copy database and replace existing database Post 302719207 by nzrobert on Monday 22nd of October 2012 08:57:24 AM
Old 10-22-2012
CRON Job to copy database and replace existing database

I have a reseller account with hostgator, which means i have WHM and Cpanel. I have set up a staging environment for one of my wordpress installations (client website), which is essentially sitting at staging.domain.com (live site is at domain.com). The staging website is a complete copy of the live website and utilises a different database.

The idea behind this is to test all new module updates / wordpress updates prior to releasing to the live website, however.. Content can chance on the live website without the staging website receiving the updates (want to use this as a backup also.)

What I want to do is set up a daily CRON job to copy the database from one hosting account to and replace another database. (tables and all) on a daily basis. I figure this will only be possible at host manager level (WHM) as a cpanel user will not have permission to interface between 2 different accounts.

Does anyone know how to do this? Do I need to create a PHP script to run every day? What would that look like.. Sorry I know its a big ask, im just clueless at this level.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Crontab job for exporting a Oracle database

Could someone give me a hint how to get or write such a job ? I want to schedule a Oracle export using the crontab, I really do not know how to do this. Concreet: How do I write such a script ? Thanks for your help. (1 Reply)
Discussion started by: c.d.israel
1 Replies

2. Shell Programming and Scripting

PERL: Read from Database and copy

I have a microsoft access database with anout 220 lines. theres a question and 4 option awnsers and only ones correct which is also listed in th database. Is there any perl script that will copy and the lines from the database and put into a .asp website ? (2 Replies)
Discussion started by: perleo
2 Replies

3. UNIX for Dummies Questions & Answers

how to run cron job to truncate database table

hi i'm a bit stuck trying to find the correct syntax in order to run a cron job which just truncates all info from a single table in my database i have a main database - db1 and i have a table in that database - userips i wish to create a cron job that truncates or removes all the info... (9 Replies)
Discussion started by: wingchun22
9 Replies

4. Shell Programming and Scripting

Sample ksh script for copy the data from excel to database table ?

Hi All, I need to convert the data from excel to database table in sybase. Please provide some sample script.. thanks, Royal. (1 Reply)
Discussion started by: royal9482
1 Replies

5. Shell Programming and Scripting

How to write cron job for calling sql function database is postgres

Hi, Please help me to write cron job for calling sql function daily. I have Postgres database. (1 Reply)
Discussion started by: kulbhushan
1 Replies

6. Solaris

redirect solaris database from linux database..

hi.. i have a need .. my php runs on my linux redhat box with mysql.. i want my php code to refer another mysql database which is in solaris 10 x86... can u tell me the procedure .. how it can be done through php .. sorry am new to php... is it possible to redirect from linux mysql to... (7 Replies)
Discussion started by: senkerth
7 Replies

7. Solaris

Can't create database after Oracle Database installation

I installed Oracle 10 software on Solaris 11 Express, everything was fine execpt I can't create database using dbca.rsp file. I populated file with following options. OPERATION_TYPE = "createDatabase" GDBNAME = "solaris_user.domain.com" SID = "solaris_user" TEMPLATENAME = "General... (0 Replies)
Discussion started by: solaris_user
0 Replies

8. Shell Programming and Scripting

Problem with backup and copy a database

Hi, I have many servers distributed on my customer locations all servers has MYSQL database. I want to backup database for each server on server at my location using scheduler. So I create Shell script file to backup and copy the database file from customer server to my server as... (3 Replies)
Discussion started by: amsbas
3 Replies

9. Shell Programming and Scripting

Need to implement new CRON job or modify the existing one in MDM PROD in coming days, which will sen

Need to implement new CRON job or modify the existing one in MDM PROD in coming days, which will send email of SQL statement running from past 1 minute.Currently there is one CRON job in PROD, which send below email. there is one cron job which send email, when there is long running... (0 Replies)
Discussion started by: dampu
0 Replies
RKWARD(1)							  [FIXME: manual]							 RKWARD(1)

NAME
rkward - A KDE frontend to R SYNOPSIS
rkward [workspace_file] [--evaluate Rcode] [--debug-level level] [--debug-flags flags] [--debugger debugger_command] [KDE Generic Options] [Qt Generic Options] DESCRIPTION
RKWard is the a KDE-based GUI and IDE for the R scripting language for statistical computing. For more information, please refer to the RKWard website[1], and the documentation provided inside RKWard. OPTIONS
--evaluate Rcode The given R code is evaluated after RKWard has started, and after any specified workspace is loaded. Mostly useful for automated testing. --debug-level level Verbosity of debug output. 0-5, where 0 is no output, 5 is all output including function trace information. Default it 2. --debug-flags flags Allows to configure, which sections of code to debug. Flags are given as a binary number. Refer to the source files for documentation, as this really is an internal option. --debugger command Run RKWard through the specified debugger command. To add command line options to the debugger command, enclose them in single quotes ('') together with the command. NOTE: To use the --debugger option, it must be specified as the first option on the command line. Only the frontend process will be debugged, using this option. SEE ALSO
R(1) AUTHORS
RKWard was written by Thomas Friedrichsmeier and the RKWard team. See the RKWard website[1]. NOTES
1. the RKWard website http://rkward.sf.net/ [FIXME: source] 2011-05-23 RKWARD(1)
All times are GMT -4. The time now is 09:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy