Good grief! What a heck of a problem. We have a "race condidtion" of what pattern occurs first in the pattern file and what occurs first in the string. When found a pattern, and reduced the string, we need to start over with the first pattern again. I think I have found a solution; try and report back:
Thank you so much RudiC for your valuable time and help. Solution works perfectly fine.
Hi Guys,
I need to script the renaming of files as followins:
files:
firstjd
secondjo
thirdjv
My script needs to insert the date/time infront of the last 2 characters of the filenames above, any ideas greatly received :)
the letters before the last 2 characters could change, I'm only... (7 Replies)
Hi, i have a filename CRED20102009.txt in a server
20102009 is the date of the file ddmmaaaa format
the complete route is
/dprod/informatica/Fuentes/CRED20102009.csv
i want to extract the date to create a new file named Parameters.txt
I need to create Parameters.txt with this... (6 Replies)
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)
I have lots of files in this format:
dvgrab-2003.06.29_15-30-24.mpg
The numbers represents the date and time (YYYY.MM.DD_HH-MM-SS)
How can I extract the dates from the filenames, and use the dates in the file timestamp?
I guess this can be done by using "find", "sed" and "touch"?
Can... (6 Replies)
Hi,
There are similar kind of posts, but none seems like working for me. Please correct me if I'm wrong.
I need append/rename file abc.txt with file processed date and time like abc_systemdatetimestamp.txt
and move it to different folder.
for example I have
/source/data/abc.txt
... (1 Reply)
Hi All,
Thanks in Advance
I am working on a shell script. I need some assistance.
My Requirement:
1) There are some set of files in a directory like given below
OTP_UFSC_20120530000000_acc.csv
OTP_UFSC_20120530000000_faf.csv
OTP_UFSC_20120530000000_prom.csv... (0 Replies)
Hi All,
Thanks in Advance
I am working on a shell script. I need some assistance.
My code:
if
then
set "subscriber" "promplan" "mapping" "dedicatedaccount" "faflistSub" "faflistAcc" "accumulator"\
"pam_account";
for i in 1 2 3 4 5 6 7 8;... (0 Replies)
Hi All,
Thanks in Advance
Shell Script or Perl Script
I am working on a shell script. I need some assistance.
My Requirement:
1) There are some set of files in a directory like given below
OTP_UFSC_20120530000000_acc.csv
OTP_UFSC_20120530000000_faf.csv... (7 Replies)
Hi All,
I have incoming source files abcmmyy.txt I need to extract the mmyy part from the filename and pass that to a variable . I really appreciate your quick response on this.
Thanks
raj (7 Replies)
Hi,
I'm totally new in sell script and working with a shell code. I want to extract the date and time from the filenames. The filenames are different but all of them begins with WI_ SCOPE_:
WI_SCOPE_DATA_CHANGE_2017-09-12_15-30-40.txt
WI_SCOPE_BACK_COMPLETE_QUEUE_2017-09-12_15-31-40.txt... (5 Replies)
Discussion started by: Home
5 Replies
LEARN ABOUT CENTOS
amfetchdump
AMFETCHDUMP(8) System Administration Commands AMFETCHDUMP(8)NAME
amfetchdump - extract backup images from multiple Amanda tapes.
SYNOPSIS
amfetchdump [-c | -C | -l] [-p | -n] [-a] [-O directory] [-d device] [-h | --header-file filename | --header-fd fd] [--decompress |
--no-decompress | --server-decompress | --client-decompress]
[--extract --directory directory [--data-path amanda|directtcp] [--application-property NAME=VALUE]*] [--decrypt | --no-decrypt
| --server-decrypt | --client-decrypt] [--exact_match] [-o configoption...] config hostname
[disk [ date [ level [ hostname [...] ] ] ]]
DESCRIPTION
Amfetchdump pulls one or more matching dumps from tape or from the holding disk, handling the reassembly of multi-tape split dump files as
well as any tape autochanger operations. The dump are by default decompressed and decrypted.
It will automatically use the Amanda catalog to locate available dumps on tape, in the same way that the find feature of amadmin(8) lists
available dumps.
The hostname, diskname, datestamp, and level dump specifications are further described in amanda-match(7). Note that at minimum a hostname
must be specified.
Unless -p is used, backup images are extracted to files in the current directory named:
If a changer error occurs, or the -d option is given, then amfetchdump prompts for each required volume.
hostname.diskname.datestamp.dumplevel
OPTIONS -p
Pipe exactly one complete dump file to stdout, instead of writing the file to disk. This will restore only the first matching dumpfile
(where "first" is determined by the dump log search facility).
-h
Output the amanda header as a 32K block to same output as the image.
--header-fd fd
Output the amanda header to the numbered file descriptor.
--header-file filename
Output the amanda header to the filename.
-d device_or_changer
Restore from this device or changer instead of the default, prompting for each volume.
-O directory
Output restored files to this directory, instead of to the current working directory.
-c
Compress output, fastest method available.
-C
Compress output, smallest file size method available.
--decompress
Always do the decompression, this is the default.
--no-decompress
Never do the decompression.
--server-decompress
Do the decompression only if the compression was done on the server.
--client-decompress
Do the decompression only if the compression was done on the client.
--decrypt
Always do the decryption, this is the default.
--no-decrypt
Never do the decryption.
--server-decrypt
Do the decryption only if the encryption was done on the server.
--client-decrypt
Do the decryption only if the encryption was done on the client.
--exact-match
The host and disk are parsed as exact values
--extract
Extract the backup on the server in the directory directory.
--directory directory
Where to extract the backup with the --extract option.
Warning: All files in that directory can be removed.
--data-path amanda|directtcp
The data path to use with --extract, the default is to use the fatest data path.
--application-property NAME=VALUE
Application property to send to the application with --extract.
-l
Leave dumps in the compressed/uncompressed and encrypted/unencrypted state in which they were found on tape. It is a synonym for
--no-decompression --no-decryption
-a
Assume that all tapes are already available, via tape changer or otherwise, instead of prompting the operator to ensure that all tapes
are loaded.
-n
Do not reassemble split dump files at all, just restore each piece as an individual file.
-o configoption
See the "CONFIGURATION OVERRIDE" section in amanda(8).
EXAMPLES
All the examples here assume your configuration is called SetA.
Here's a simple case, restoring all known dumps of the host vanya to the current working directory.
$ amfetchdump SetA vanya
A more likely scenario involves restoring a particular dump from a particular date. We'll pipe this one to GNU-tar as well, to
automatically extract the dump.
$ amfetchdump -p SetA vanya /home 20051020 | gtar -xvpf -
CAVEATS
Amfetchdump is dependent on accessing your server's config, tape changer, and (normally) dump logs. As such, it's not necessarily the most
useful tool when those have all been wiped out and you desperately need to pull things from your tape. Pains have been taken to make it as
capable as possible, but for seriously minimialist restores, look to amrestore(8) or dd(8) instead.
SEE ALSO amanda(8), amanda-match(7), amadmin(8), amrestore(8)
The Amanda Wiki: : http://wiki.zmanda.com/
AUTHORS
John Stange <building@nap.edu>
National Academies Press
Ian Turner <ian@zmanda.com>
Zmanda, Inc. (http://www.zmanda.com)
Amanda 3.3.3 01/10/2013 AMFETCHDUMP(8)