Need help in creating file restoration script from a backup script.
Hi all
i am struggling in creating a restore of env files while doing applications clone.
the first file i created for copying the important configurations file
which is running perfect
now for reverting the changes i mean when i am restoring these files to its original places
i have to do manual woking
i use this command to create a restore file
but after doing this also i have to lots of manual cuttings filterings
i need to cut the last part of 3rd column and then past it in last of 2nd column
can i have your valuble suggestions to do this work through an command or script.
it would be a great help.
backup script:
###########
Restoration command:
#################
my requirement looks like this
################################
First thanks for replying with this great command.
but still it does not have "cp" in first column.
and i dont understand this command can it be more simple
so that i can easily use it.
I was targeting for your actual requirement.
printing "cp" is not difficult. ---------- Post updated at 18:12 ---------- Previous update was at 18:09 ----------
Quote:
Originally Posted by javeedkaleem
i dont understand this command can it be more simple
so that i can easily use it.
The directory context "admin" is lost. Therefore you cannot do a sensible restore.
Similarly the lines which copy files to:
$BKPDIR/8.0.6
$BKPDIR/comn
$BKPDIR/iAS
Also there is no attempt to preserve file permissions. Each "backup" file will be owned by the user making the copy and with default permissions according to the current umask.
As it stands, if you attempt a restore you will corrupt your Oracle intallation.
Hi,
I am very new to scripting. I need to create a script which does following.
Scenario:
First get the format command output echo | format
Insert the new disk to Solaris Server
Get Zpool status
format the new disk
( Here I need to select the new disk which have been inserted, I do... (1 Reply)
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)
Hi there,
Alright I have this line that I'm working with (bash programming):
mysql -u username -pHASH ${args} < /home/site/backups/site.${args}.sql
I get this error on that line:
./restore.sh: line 51: syntax error near unexpected token `newline'
./restore.sh: line 51: `mysql -u... (5 Replies)
Hi!
I want to test something to learn Shell scripting better.
1)
How can I make a BackUp from all users and groups homedirectory?
I want to save that backup in an archiv.
Can I choose how to name the backUp archiv?
2)
Ok I want to make a file like csv, in this file are listed Users.... (3 Replies)
I am trying to restore opt on my server.
my issue is, all the partitions are saved into the same back up tape.
what is the exact command to just restore /opt for example, supposing c0t0d0s7 is the partition for /opt
---------- Post updated at 01:16 PM ---------- Previous update was at... (7 Replies)
Here is my code which i am using wright now:
CODE
#!/bin/bash
awk ' BEGIN { FS="|";
while ( getline <"file1.txt" > 0)
a=$2
}
{
if($1 in a)
printf("%s %s Specialty Mapped\n", $1, a) > "mapped.txt"
else
printf("%s %s Specialty Not mapped\n", $1, $2) > "notmapped.txt"
... (2 Replies)
Hi,
I need help urgently for following issue. Pls help me to resolve this issue.
I am calling sql script file(file1.sql) from UNIX Shell Script(script1.ksh) using sql plus and trying to create flat file that contains all records returned from SQL query in SQL script(file1.sql)
I given... (6 Replies)
could you please find a solution for this
script that backup a file. The file name to backup should be provided as input parameter, the backup file should have the same file name with the extension ".bak". If the user provides no input parameter, the script should display an error message. If... (1 Reply)
I have a simple backup script that I am running to back up drives across the network. However I need to have detailed log files for this script such as time backup started, what was backed up, if there were any errors and the time that the backup was complete. I would also like the script to... (3 Replies)