Sponsored Content
Top Forums Shell Programming and Scripting Help with Backup Shell Script Post 302555161 by pludi on Wednesday 14th of September 2011 04:28:45 AM
Old 09-14-2011
What have you tried so far? The purpose of this forum isn't for people to request ready-to-go scripts, but to provide help when you're stuck.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Help with a backup shell script

I'm having an issue with a problem A problem with this backup script is that if you backup the same file twice, you may get a warning message because you're overwriting an existing file. You could suppress the warning message, but a better solution is to save a series of backups distinguished by... (1 Reply)
Discussion started by: Dingosatemypant
1 Replies

2. Shell Programming and Scripting

Help with backup shell script

Hello all, I am trying to backup my system database and root filesystem on remote server that is mounted on my system using tar command. For the database, i use (cd /database; tar cvf file.tar .) for the Root filesystem, i use (cd /; tar uEvf file.tar .) both are to be backup on the same... (1 Reply)
Discussion started by: Omoniyi
1 Replies

3. Homework & Coursework Questions

Help with Backup Shell Script

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Create a script that will backup all important system files every Friday night and send an email to the... (6 Replies)
Discussion started by: kjmpa26
6 Replies

4. Shell Programming and Scripting

Help with backup shell script

Hello, Need help with a script to backup a configuration file BSD Save the file / Firewall / ConfigFiles to a remote ftp server here is the script # / bin / sh Date = $ (date +% d-% Y-% m-H-M) tar-cvf ConfigFiles.tar / Firewall / ConfigFiles ConfigFiles.tar mv / Firewall-$... (11 Replies)
Discussion started by: telouet
11 Replies

5. Shell Programming and Scripting

shell script to backup

Q: script to daily backup all databases in the server, retain only last 4 backps please anyone give me a reply (3 Replies)
Discussion started by: pssooraj72
3 Replies

6. Shell Programming and Scripting

Help with Backup Shell Script for Network Device Configuration backup

HI all, im new to shell scripting. need your guidence for my script. i wrote one script and is attached here Im explaining the requirement of script. AIM: Shell script to run automatically as per scheduled and backup few network devices configurations. Script will contain a set of commands... (4 Replies)
Discussion started by: saichand1985
4 Replies

7. Shell Programming and Scripting

Help with Backup Shell Script

i need to print the first date of the previous month in 20130101 format. i use the below script month_year=$(date +'%m%Y' | awk '!--$1{$1=12;$2--}') m=${month_year% *} y=$month_year##* } d=$(cal $m $y | paste -s - | awk '{print $NF}') firstdate=${printf '02d01%s' $y $m) echo $firstdate ... (1 Reply)
Discussion started by: vino1989
1 Replies

8. Shell Programming and Scripting

Help with Backup Shell Script

Hello guys. I am a Brazilian, I use a linux machine, to access it using the program Putty. I own a GTA Multiplayer, I have a folder on my server named accounts, there is the account of all players. Each player has their own file, the files are saved as follows: PlayerName.ini I would... (4 Replies)
Discussion started by: JimCarrey
4 Replies

9. Shell Programming and Scripting

Shell script to call Oracle archive backup script when file system reaches threshold value

Hello All, I need immediate help in creating shell script to call archivebkup.ksh script when archive file system capacity reaches threshold value or 60% Need to identify the unique file system that reaches threshold value. ex: capacity ... (4 Replies)
Discussion started by: sasikanthdba
4 Replies

10. Shell Programming and Scripting

Help with Backup Shell Script

Dear friends, I need your help. I need to create a bash script which can loop through $source_dir once a month, and find the backup of the last day of a given month for each of the 2 file types, as can be seen below. Assume that source_dir="/backup/daily" Assume that... (1 Reply)
Discussion started by: joemb
1 Replies
Tcl_AsyncCreate(3)					      Tcl Library Procedures						Tcl_AsyncCreate(3)

__________________________________________________________________________________________________________________________________________________

NAME
Tcl_AsyncCreate, Tcl_AsyncMark, Tcl_AsyncInvoke, Tcl_AsyncDelete, Tcl_AsyncReady - handle asynchronous events SYNOPSIS
#include <tcl.h> Tcl_AsyncHandler Tcl_AsyncCreate(proc, clientData) Tcl_AsyncMark(async) int Tcl_AsyncInvoke(interp, code) Tcl_AsyncDelete(async) int Tcl_AsyncReady() ARGUMENTS
Tcl_AsyncProc *proc (in) Procedure to invoke to handle an asynchronous event. ClientData clientData (in) One-word value to pass to proc. Tcl_AsyncHandler async (in) Token for asynchronous event handler. Tcl_Interp *interp (in) Tcl interpreter in which command was being evaluated when handler was invoked, or NULL if handler was invoked when there was no interpreter active. int code (in) Completion code from command that just completed in interp, or 0 if interp is NULL. _________________________________________________________________ DESCRIPTION
These procedures provide a safe mechanism for dealing with asynchronous events such as signals. If an event such as a signal occurs while a Tcl script is being evaluated then it isn't safe to take any substantive action to process the event. For example, it isn't safe to evaluate a Tcl script since the interpreter may already be in the middle of evaluating a script; it may not even be safe to allocate mem- ory, since a memory allocation could have been in progress when the event occurred. The only safe approach is to set a flag indicating that the event occurred, then handle the event later when the world has returned to a clean state, such as after the current Tcl command completes. Tcl_AsyncCreate, Tcl_AsyncDelete, and Tcl_AsyncReady are thread sensitive. They access and/or set a thread-specific data structure in the event of an --enable-thread built core. The token created by Tcl_AsyncCreate contains the needed thread information it was called from so that calling Tcl_AsyncMark(token) will only yield the origin thread into the AsyncProc. Tcl_AsyncCreate creates an asynchronous handler and returns a token for it. The asynchronous handler must be created before any occur- rences of the asynchronous event that it is intended to handle (it is not safe to create a handler at the time of an event). When an asyn- chronous event occurs the code that detects the event (such as a signal handler) should call Tcl_AsyncMark with the token for the handler. Tcl_AsyncMark will mark the handler as ready to execute, but it will not invoke the handler immediately. Tcl will call the proc associated with the handler later, when the world is in a safe state, and proc can then carry out the actions associated with the asynchronous event. Proc should have arguments and result that match the type Tcl_AsyncProc: typedef int Tcl_AsyncProc( ClientData clientData, Tcl_Interp *interp, int code); The clientData will be the same as the clientData argument passed to Tcl_AsyncCreate when the handler was created. If proc is invoked just after a command has completed execution in an interpreter, then interp will identify the interpreter in which the command was evaluated and code will be the completion code returned by that command. The command's result will be present in the interpreter's result. When proc returns, whatever it leaves in the interpreter's result will be returned as the result of the command and the integer value returned by proc will be used as the new completion code for the command. It is also possible for proc to be invoked when no interpreter is active. This can happen, for example, if an asynchronous event occurs while the application is waiting for interactive input or an X event. In this case interp will be NULL and code will be 0, and the return value from proc will be ignored. The procedure Tcl_AsyncInvoke is called to invoke all of the handlers that are ready. The procedure Tcl_AsyncReady will return non-zero whenever any asynchronous handlers are ready; it can be checked to avoid calls to Tcl_AsyncInvoke when there are no ready handlers. Tcl calls Tcl_AsyncReady after each command is evaluated and calls Tcl_AsyncInvoke if needed. Applications may also call Tcl_AsyncInvoke at interesting times for that application. For example, Tcl's event handler calls Tcl_AsyncReady after each event and calls Tcl_AsyncInvoke if needed. The interp and code arguments to Tcl_AsyncInvoke have the same meaning as for proc: they identify the active interpreter, if any, and the completion code from the command that just completed. Tcl_AsyncDelete removes an asynchronous handler so that its proc will never be invoked again. A handler can be deleted even when ready, and it will still not be invoked. If multiple handlers become active at the same time, the handlers are invoked in the order they were created (oldest handler first). The code and the interpreter's result for later handlers reflect the values returned by earlier handlers, so that the most recently created handler has last say about the interpreter's result and completion code. If new handlers become ready while handlers are executing, Tcl_AsyncInvoke will invoke them all; at each point it invokes the highest-priority (oldest) ready handler, repeating this over and over until there are no longer any ready handlers. WARNING
It is almost always a bad idea for an asynchronous event handler to modify the interpreter's result or return a code different from its code argument. This sort of behavior can disrupt the execution of scripts in subtle ways and result in bugs that are extremely difficult to track down. If an asynchronous event handler needs to evaluate Tcl scripts then it should first save the interpreter's result plus the values of the variables errorInfo and errorCode (this can be done, for example, by storing them in dynamic strings). When the asynchronous handler is finished it should restore the interpreter's result, errorInfo, and errorCode, and return the code argument. KEYWORDS
asynchronous event, handler, signal Tcl 7.0 Tcl_AsyncCreate(3)
All times are GMT -4. The time now is 03:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy