Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Calling a remote shell script and applying a DB dump Post 302766761 by daveu7 on Tuesday 5th of February 2013 10:42:38 AM
Old 02-05-2013
Calling a remote shell script and applying a DB dump

Hi All,

I have a requirement to call a remote shell script to apply a db dump. The remote shell script will reside in the /root/admin/bin directory and the database dump will be copied by the script from another area to /root/admin/var.

the script will then invoke mysql to apply the db dump.

1). Can I setup a ssh public/private key against a root user on the remote server or do I have a to create another user to own the script on the remote area as well as a directory to hold the dump also own by the same user.

I say this because I know that it is not possible to loggin to a server as root it has to be another user eg. fbloggs

2). In my remote shell I have various SQL operations as part of the dump is there a way to test the success of all SQL operations in a shell script sql block rather than applying a test against each individual SQL operation.

Many thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Calling shell script ?

hi friends, i'm new to unix and straight away i had to start with the script files. I've a script file which gets called from a menu item on a GUI. This script file again calls .awk file, in performing some tasks , which also generates certain files. I modified the files to generate some... (1 Reply)
Discussion started by: Ravi_Kandula
1 Replies

2. Solaris

Shell script to send email alert for core dump

Friends, I am in search for a shell script that is capable of running as a cronjob and have to send out an email when ever there is a CORE DUMP. Please post the hints to achieve my goal. Thanks in advance. (1 Reply)
Discussion started by: rtatineni
1 Replies

3. Shell Programming and Scripting

Calling shell functions from another shell script

Hi, I have a query .. i have 2 scripts say 1.sh and 2.sh 1.sh contains many functions written using shell scripts. 2.sh is a script which needs to call the functions definded in 1.sh function calls are with arguments. Can some one tell me how to call the functions from 2.sh? Thanks in... (6 Replies)
Discussion started by: jisha
6 Replies

4. Shell Programming and Scripting

calling a script in remote server

Hi, I need to call a shell script present in the remote server from the shell sript in my server. Can any one help to do this ASAP... Thanks (1 Reply)
Discussion started by: Preet
1 Replies

5. Shell Programming and Scripting

Calling another shell script

Hi there, I have an script reading content of a file and runs whatever command is specified there, as follows #!/bin/bash # Supposed to read from a file that commands are listed to be run # when the server starts for initialization CMD_FILE=/myScripts/startup/task2do.txt if ; then ... (2 Replies)
Discussion started by: james gordon
2 Replies

6. Shell Programming and Scripting

connect to remote server by applying password

Hi , I am new to shell script. I have to write a shell script which will login to remote server then check for the space there. There 50 remote ervers all are having different password. Could you please suggest me some way. I am working on solaris box. Thanks in advance (2 Replies)
Discussion started by: vikash_k
2 Replies

7. Shell Programming and Scripting

calling 'n' number of shell scripts based on dependency in one shell script.

Hello gurus, I have three korn shell script 3.1, 3.2, 3.3. I would like to call three shell script in one shell script. i m looking for something like this call 3.1; If 3.1 = "complete" then call 3.2; if 3.2 = ''COMPlete" then call 3.3; else exit The... (1 Reply)
Discussion started by: shashi369
1 Replies

8. Solaris

how to login with ssh to remote system with out applying the remote root/usr password

how to login with ssh to remote system with out applying the remote root/user password with rlogin we can ujse .rhosts file but with ssh howits possible plz guide (2 Replies)
Discussion started by: tv.praveenkumar
2 Replies

9. Shell Programming and Scripting

Triggering remote UNIX shell script from Remote desktop

I m trying to run a batch script in remote desktop which executes unix commands on the unix server...the problem is i wnt the output in HTML format.so in my batch script i m giving the cmd like ssh hostname path ksh HC_Report.ksh>out.html ...but it generates the HTML file in remote desktop .i... (2 Replies)
Discussion started by: navsan
2 Replies

10. Shell Programming and Scripting

Core dump in a simple shell script!

Hi I have a very simple shell script that is dumping core - testScript - #!/bin/ksh PROG=${0##*/} # basename if ; then print -u2 "Usage: $PROG filename" exit 1 fi MDY=$(date '+%m%d%y') if ; then cat ${1}.out >>${1}.${MDY} else cp -p ${1}.out... (5 Replies)
Discussion started by: nsinha
5 Replies
dtappsession(1) 						   User Commands						   dtappsession(1)

NAME
dtappsession - start a new Application Manager session SYNOPSIS
/usr/dt/bin/dtappsession [hostname] DESCRIPTION
dtappsession is a specialized version of the Xsession shell script. It is an alternative to using the CDE remote login that allows you to access a remote host without logging out of your current CDE session. dtappsession starts a new instance of the CDE Application Manager in its own ToolTalkTM session. It can be used to remotely display the Application Manager back to your local display after logging in to a remote host with the rlogin(1) command. A new, independent instance of ttsession(1) starts a simple session management window. This window displays the title remote_hostname: Remote Administration where remote_hostname is the system that is being accessed. The window also displays an Exit button. Clicking Exit terminates the ToolTalk session and all windows that are part of the session. The Application Manager that is displayed can be used to start remote CDE actions to run in this session. Exiting the Application Manager does not terminate the session, and it is not recommended. Clicking Exit is the recommended way to end the session. To avoid confusing the remote CDE applications with local ones, it is recommended that a new CDE workspace be created for clients in the remote session. The hostname is not needed when the DISPLAY environment variable is set to the local hostname on the remote host. On a system that is configured with Trusted Extensions, dtappsession can be used for remote administration by administrative roles that have the ability to log in to the remote host. dtappsession does not require any privilege, and it does not need to run on a system that is configured with Trusted Extensions. When installed in /usr/dt/bin on a Solaris system, along with the startApp.ds file, dtappsession can be used to administer the remote Solaris system from a local system that is configured with Trusted Extensions. However, in this case, the CDE workspace that is used for remote display must be a normal workspace, rather than a role workspace. EXAMPLES
Example 1 Remote Login and dtappsession After creating a new CDE workspace, type the following in a terminal window: # rlogin remote_hostname password: /*type the remote password*/ # dtappsession local_hostname /* on the remote host */ FILES
/usr/dt/bin/startApp.ds dt Korn shell script for session manager window ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWdttsu | +-----------------------------+-----------------------------+ |Interface Stability |Committed | +-----------------------------+-----------------------------+ BUGS
X11/CDE applications that do not register with the ToolTalk session manager will not exit automatically when the session is terminated. Such applications must be explicitly terminated. SEE ALSO
dtfile(1), rlogin(1), ttsession(1), attributes(5) Chapter 14, Remote Administration in Trusted Extensions (Tasks), in Solaris Trusted Extensions Administrator's Procedures NOTES
The functionality described on this manual page is available only if the system is configured with Trusted Extensions. SunOS 5.11 15 Aug 2005 dtappsession(1)
All times are GMT -4. The time now is 08:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy