Sponsored Content
Top Forums Shell Programming and Scripting Increment date in Automation of backup jobs Post 302654011 by donadarsh on Monday 11th of June 2012 06:39:10 AM
Old 06-11-2012
I didn't understand fully your question but just try this, hope you want same.
Code:
TODAY=`date '+%d%m%Y'`
expdp system/test@Database dumpfile='expdp_database_'$TODAY'.dmp' directory=datapump_database  logfile='expdp_database_'$TODAY'.log' full=y


Last edited by donadarsh; 06-11-2012 at 07:40 AM.. Reason: code tags
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Increment date in 'for' loop?

Hi Guys, My first post..:) Right...I want to move existing files (with some date in their name) currently in $mainftp, to $mainfolder/$foldate/system1. I'd like to be able to increment date in the for loop? Is this possible or should I use a different technique. The script return the... (4 Replies)
Discussion started by: SunnyK
4 Replies

2. UNIX for Advanced & Expert Users

automation of Informatica jobs using Unix

1.How will you do automation of Informatica jobs using Unix ? 2. How u run workflow from Unix? :) (2 Replies)
Discussion started by: kamesh83
2 Replies

3. Shell Programming and Scripting

Can we increment or decrement a date value?

export a=`date` a=`expr $a + 1` Is it possible? if not how can i increment or decrement a date variable? (2 Replies)
Discussion started by: arghya_owen
2 Replies

4. Shell Programming and Scripting

How to increment a user defined date value in the DATE format itself using shell script?

I need to increment a date value through shell script. Input value consist of start date and end date in DATE format of unix. For eg. I need increment a date value of 1/1/09 to 31/12/09 i.e for a whole yr. The output must look like 1/1/09 2/2/09 . . . 31/1/09 . . 1/2/09 . 28/2/09... (1 Reply)
Discussion started by: sunil087
1 Replies

5. Shell Programming and Scripting

Increment date in script

Hi, Iam new to scripting language.:o can someone help me out solving this thread?hopingly ya....:) I want to write a script which connects to db and searches the count in a table which has date column and id column. If the count is not equal to 0 then it should increment the date with the one... (4 Replies)
Discussion started by: jyothi_wipro
4 Replies

6. Shell Programming and Scripting

Increment in date

Hi, I have a variable lets say DATA_DATE. I have to pass some value to this variable in YYYYMMDD format. lets say today I have passed this variable as : DATA_DATE=20100107 Then pls help me how to calculate another variable DATA_DATE1 (which is DATA_DATE+1). The code should work... (3 Replies)
Discussion started by: 46019
3 Replies

7. Shell Programming and Scripting

Date increment

hi Friends, Today_Dt=`date "+%Y-%m-%d"` So the Today date is 2010-05-03 I have a file which has date values as below 2010-04-27 2010-04-02 2010-04-18 2010-04-28 2010-04-29 .. (1 Reply)
Discussion started by: Gopal_Engg
1 Replies

8. Shell Programming and Scripting

how to update date part with new increment date time

hi experts, my requirement is like this i need to develop a shell script to update date part with new incremental date time in file some 'X' which is kept at some server location incrementing every two hours.as i am new to this scripting i need support from u people,thanx in advance (1 Reply)
Discussion started by: amanmro
1 Replies

9. Shell Programming and Scripting

Date increment logic

Hi all, I need to increment date at run time. Example: I need to write a shell script with two parameters. 1. country code like (US,UK, IND.....) 2. Date range from_date to to_date (20070101 to 20070331) I need to run shell script like this country_info.sh US 20070101 20070331 ... (3 Replies)
Discussion started by: pmreddy
3 Replies

10. UNIX for Beginners Questions & Answers

Urgent for date increment

hi all, i would like to increment the date variable i am using for((i=20190731;i<=20190801;i++)) do done after 20190731 it should be 20190801 but this taking as 20190732,20190733.... kindly help me to solve this (3 Replies)
Discussion started by: prathaban
3 Replies
BACKUP_SAVEDB(8)					       AFS Command Reference						  BACKUP_SAVEDB(8)

NAME
backup_savedb - Creates a saved copy of the Backup Database SYNOPSIS
backup savedb [-portoffset <TC port offset>] [-archive <date time>+] [-localauth] [-cell <cell name>] [-help] backup sa [-p <TC port offset>] [-a <date time>+] [-l] [-c <cell name>] [-h] DESCRIPTION
The backup savedb command creates a backup copy of the entire Backup Database and writes it to the tape in the device controlled by the Tape Coordinator indicated with the -portoffset argument. If the database is damaged (as reported by the backup dbverify command), this command repairs as much of the corruption as possible as it creates the saved copy. The Backup Server creates a dump record for the saved database in the Backup Database (but in the disk version of the database only, not in the version written to tape). If the "FILE YES" instruction appears in the /var/lib/openafs/backup/CFG_device_name file associated with the specified port offset, then the backup savedb command dumps the database copy to the backup data file listed for that port offset in the Tape Coordinator's /var/lib/openafs/backup/tapeconfig file, instead of to tape. For the sake of clarity, the following text refers to tapes only, but the Backup System handles backup data files in much the same way. If the -archive flag is provided, after writing the saved copy of the database the Backup System truncates the copy of the database on disk by deleting volume dump records with timestamps prior to the specified date and time (it does not delete the dump records created by previous backup savedb commands, however). If the tape to which the database copy is written has an AFS tape name, it must be "Ubik_db_dump.1" or "<NULL>". Any permanent name is acceptable. The Tape Coordinator's default response to this command is to access the first tape by invoking the "MOUNT" instruction in the local /var/lib/openafs/backup/CFG_device_name file, or by prompting the backup operator to insert the tape if there is no "MOUNT" instruction. However, if the "AUTOQUERY NO" instruction appears in the CFG_device_name file, or if the issuer of the butc command included the -noautoquery flag, the Tape Coordinator instead expects the tape to be in the device already. If it is not, the Tape Coordinator invokes the "MOUNT" instruction or prompts the operator. It also invokes the "MOUNT" instruction or prompts for any additional tapes needed to complete the operation; the backup operator must arrange to provide them. OPTIONS
-portoffset <TC port offset> Specifies the port offset number of the Tape Coordinator handling the tapes for this operation. -archive <date time>+ Specifies a date and time; volume dump records with earlier timestamps are deleted from the disk copy of the Backup Database after the Backup System dumps the database (a dump's timestamp appears in the "created" field of the output from the backup dumpinfo command). However, if a dump set contains any dump created after the specified date, none of the dump records associated with the dump set are deleted. Dump records for previous dumps of the database (created with the backup savedb command) are never deleted; use the backup deletedump command to remove them. Provide one of two values: o The string "NOW" to indicate the current date and time, in which case the Backup System deletes all dump records except those for dumps of the Backup Database itself. o A date value in the format mm/dd/yyyy [hh:MM]. The month (mm), day (dd), and year (yyyy) are required, and valid values for the year range from 1970 to 2037; higher values are not valid because the latest possible date in the standard UNIX representation is in February 2038. The Backup System automatically reduces any later date to the maximum value. The hour and minutes (hh:MM) are optional, but if provided must be in 24-hour format (for example, the value "14:36" represents 2:36 p.m.). If omitted, the time defaults to 59 seconds after midnight (00:00:59 hours). Similarly, the backup command interpreter automatically adds 59 seconds to any time value provided. In both cases, adding 59 seconds compensates for how the Backup Database and backup dumpinfo command represent dump creation times in hours and minutes only. That is, the Database records a creation timestamp of "20:55" for any dump created between 20:55:00 and 20:55:59. Automatically adding 59 seconds to a time thus includes the records for all dumps created during that minute. -localauth Constructs a server ticket using a key from the local /etc/openafs/server/KeyFile file. The backup command interpreter presents it to the Backup Server, Volume Server and VL Server during mutual authentication. Do not combine this flag with the -cell argument. For more details, see backup(8). -cell <cell name> Names the cell in which to run the command. Do not combine this argument with the -localauth flag. For more details, see backup(8). -help Prints the online help for this command. All other valid options are ignored. EXAMPLES
The following example writes a copy of the Backup Database to the tape device controlled by the Tape Coordinator with port offset 1: % backup savedb -portoffset 1 PRIVILEGE REQUIRED
The issuer must be listed in the /etc/openafs/server/UserList file on every machine where the Backup Server is running, or must be logged onto a server machine as the local superuser "root" if the -localauth flag is included. SEE ALSO
butc(5), backup(8), backup_dbverify(8), backup_restoredb(8), butc(8) COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved. This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell. OpenAFS 2012-03-26 BACKUP_SAVEDB(8)
All times are GMT -4. The time now is 04:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy