|Page 1 of 1|
|Author:||r3v4n [ Wed Nov 09, 2011 4:07 am ]|
|Post subject:||TSM-Restore Script|
I need to restore about 250 files from TSM and I've had the idea to do this via Bash Script.
All files are named like
I need to restore all files between _2010-10-01_* and _2011-10-31_*
Every day has to be checked, if there are files available here and if there are, the script
should execute a command like "dsmc restore /path/<filename>_DATE_TIMESTAMP /path/restore"
Can anyone help me with this problem? I'm a total noob in scripting
Thank you all in advance für your help!
|Author:||choroba [ Wed Nov 09, 2011 5:54 am ]|
|Post subject:||Re: TSM-Restore Script|
Let's assume the list of files is given in list.txt and $prefix contains the repating name part. Then something like this should work:
} | sort > list.txt2
sed -n "/%$/,/%$/p" list.txt2 | grep -v '%$' |
xargs -I% dsmc restore % /path/restore
|Page 1 of 1||All times are UTC - 6 hours|
|© 2000, 2002, 2005, 2007 phpBB Group • http://www.phpbb.com|