Thank you very much for your reply.
I have been reading so much information in the last couple of days that when I got to doing a for loop, by brain just shut off! I feel embarrassed that it was such an "easy" piece of script!
The last piece of this will be to run rsync against the backups to the newly mounted VG/LVM's.
Thank you very much!!
Roger
---------- Post updated at 05:42 PM ---------- Previous update was at 05:19 PM ----------
Quote:
Originally Posted by Chubler_XL
Sorry to bother you again, but I forgot that I need a list of exclusions when it comes to restoring the root...
Is there a way to exclude root in the first section and then do just root in the second part?
Also, can we "variable-ize" the rsync line in the second part???
Thank you very much in advance!!
Roger
# Restoring root requires all of the other lvm's as excludes...
# rsync -aHvu --exclude={/backup/*,/home/*,/opt/*,/tmp/*,/usr/*,/usr/local/*,/var/*}
---------- Post updated at 08:13 PM ---------- Previous update was at 05:42 PM ----------
Ok. I may have come up with a workaround...
By not sorting the list prior to reading it into the array, root will always be ${farry[0]}. Therefore, I can start my mkdirs and mounts with ${farry[1]} and then come back and do ${farry[0]} at the end.
How do we create and increment a variable to read in everything from 1 through an empty offset and perform our actions using their values in the commands?
---------- Post updated at 08:25 PM ---------- Previous update was at 08:13 PM ----------
Answer:
After that we can come back with
Last step:
To "auto-variable-ize" the rsync exclusions for / restoration...
Last edited by RogerBaran; 05-21-2015 at 11:18 AM..
Reason: minor corrections to text
Hello script experts,
I am newbie to shell script. But I have to write a shell script (ASAP) where I need to ftp a file on daily basis to a remote server, and send an email with final status. I I should have a properties file with hostname, Userid, and pwd. And a shall script file should read... (1 Reply)
I am a new member of this forum and am also new to unix shell scripting.
I joined the forum to seek for help to achieve my task as this forum helps people.
here's what i do manually on daily basis
1)Loginto different unix box
2)Ftp the log files (morethan 50 each dir) to windows
3)use text pad... (3 Replies)
hi friends,
I am trying to automate the daily monitoring process of UNIX server and it's processes. the script are below
i executed the above script using ksh -x monitortest1.sh in root login . It shows error at some lines .
1. i logged in using root ,but it... (8 Replies)
CAN ANYONE HELP TO SOLVE
i wann write a script to automate a process .i.e, to search files in the FTP server and
and if files are there and we hav to bring that files to our system.
After copying the files in our system we have to upload the data in the tables.
I have scripts to load the... (0 Replies)
Plzz Some One Help in this matter
I have scripts to load the data into tables and to copy files from ftp to our system.
we use to run the scripts every day....
we hav the files in the FTP server and we hav to bring the files to our system and we hav to load the data into the tables.
We... (0 Replies)
CAN ANYONE HELP TO SOLVE
i wann write a script to automate a process .i.e, to search files in the FTP server and
and if files are there and we hav to bring that files to our system.
After copying the files in our system we have to upload the data in the tables.
I have scripts to load the... (2 Replies)
Hi all,
This is my sample code in /etc/httpd/conf.d/applications.conf file currently we are creating subdomain mannually for every new subdomain. I want to automate this process througs bash script , how its possible.
<VirtualHost *:80>
ServerName google.com
ServerAlias google.com... (5 Replies)
Hi,
I am trying to create a shell script to automate the following process of getting svn stats:-
Step1:- cd to checkout location.
Note that the checked code have multiple modules in respective folders
Step2:- Execute this command inside each module:-
svn log -v --xml >... (0 Replies)
Hi, guys, I am trying to automate a sftp process using "expect" method (since the key authentication method is disabled in my company network, there is no helping it).
In order to try, I type in the command manually:
sftp @ > << EOF
>cd
>ls -l
>EOF
>Connecting to
@servername password:
... (3 Replies)
Hello!
Need help to write a Linux script that can be run from windows using command/Cygwin/any other way. I am new to scripting, actually i am trying to automate server health check like free disk space, memory along with few services status, if any services is not running then start services ,... (7 Replies)