-
- Veteran
- Posts: 665
- Liked: 4 times
- Joined: Nov 21, 2013 12:02 pm
- Full Name: Babak Seyedi nejad
- Contact:
How can run linux script for surebackup
Dear all
Hi
My sure or replica backup work excellent just not used script
Now i want run check script for sure or replica backup on vm with linux os
My script is this
. db-env
sqlplus / sysdba
select status from v$instance;
database is open # this is output
Now how can run it and if show database is open
In veeam report in script part show succeed
BR
Hi
My sure or replica backup work excellent just not used script
Now i want run check script for sure or replica backup on vm with linux os
My script is this
. db-env
sqlplus / sysdba
select status from v$instance;
database is open # this is output
Now how can run it and if show database is open
In veeam report in script part show succeed
BR
-
- Veteran
- Posts: 665
- Liked: 4 times
- Joined: Nov 21, 2013 12:02 pm
- Full Name: Babak Seyedi nejad
- Contact:
Re: How can run linux script for surebackup
what do i have to do ?
i want my script execute remotely on my linux for sure backup and replica backup
BR
i want my script execute remotely on my linux for sure backup and replica backup
BR
-
- Veteran
- Posts: 665
- Liked: 4 times
- Joined: Nov 21, 2013 12:02 pm
- Full Name: Babak Seyedi nejad
- Contact:
Re: How can run linux script for surebackup
No one could not run a linux script execute remotely during sure backup??
-
- Veteran
- Posts: 665
- Liked: 4 times
- Joined: Nov 21, 2013 12:02 pm
- Full Name: Babak Seyedi nejad
- Contact:
Re: How can run linux script for surebackup
nobody can not help ?
BR
BR
-
- VP, Product Management
- Posts: 6035
- Liked: 2860 times
- Joined: Jun 05, 2009 12:57 pm
- Full Name: Tom Sightler
- Contact:
Re: How can run linux script for surebackup
You need to create some type of Windows script, either Powershell or batch or whatever, that calls some type of ssh client (probably putty) which connects to the Linux VM to run the script. I previously had an example, but calling putty is something like:
putty.exe -ssh <user>@<linux_ip> -pw <password> -m C:\scripts\linux_script
You're wrapper shell script can get the IP address passed from the Surebackup test and is documented in Veeam KB1312. When I have a little more time I'll try to put up a working example if you don't work it out by then but it may be a few days as I don't have much time right now.
putty.exe -ssh <user>@<linux_ip> -pw <password> -m C:\scripts\linux_script
You're wrapper shell script can get the IP address passed from the Surebackup test and is documented in Veeam KB1312. When I have a little more time I'll try to put up a working example if you don't work it out by then but it may be a few days as I don't have much time right now.
-
- Veteran
- Posts: 665
- Liked: 4 times
- Joined: Nov 21, 2013 12:02 pm
- Full Name: Babak Seyedi nejad
- Contact:
Re: How can run linux script for surebackup
so thanks
my script is ready and i put that in prevoius post when create job i know there is a part for use script that is contain 3 field:
1-Name
2- path
3-Argumants
ok in name field i put for example = test
in path i select that script written and is on veeam backup server in this path : c:\script\sure.sh
now is that your means in argument field had to write this :
putty.exe -ssh <user>@<linux_ip> -pw <password> -m C:\scripts\linux_script
just change user with root user and linux ip and change <password> with root password ?
also i read that KB but that is not complete and clear also is for windows
BR
my script is ready and i put that in prevoius post when create job i know there is a part for use script that is contain 3 field:
1-Name
2- path
3-Argumants
ok in name field i put for example = test
in path i select that script written and is on veeam backup server in this path : c:\script\sure.sh
now is that your means in argument field had to write this :
putty.exe -ssh <user>@<linux_ip> -pw <password> -m C:\scripts\linux_script
just change user with root user and linux ip and change <password> with root password ?
also i read that KB but that is not complete and clear also is for windows
BR
-
- Veteran
- Posts: 665
- Liked: 4 times
- Joined: Nov 21, 2013 12:02 pm
- Full Name: Babak Seyedi nejad
- Contact:
Re: How can run linux script for surebackup
i am waiting for your help
BR
Babak
BR
Babak
-
- Product Manager
- Posts: 6551
- Liked: 765 times
- Joined: May 19, 2015 1:46 pm
- Contact:
Re: How can run linux script for surebackup
Assume that you have two script files located on VBR: wrapper.bat and sure.sh.
In the "Path" field you should specify path to the wrapper.bat.
In the "Arguments" field specify %vm_ip%
%wrapper.bat should contain something like this:
Replace user and password with whatever will allow connection to that particular VM.
In the "Path" field you should specify path to the wrapper.bat.
In the "Arguments" field specify %vm_ip%
%wrapper.bat should contain something like this:
Code: Select all
\path\to\putty.exe -ssh %vm_ip% -l user -pw password -m \path\to\sure.sh
-
- Veteran
- Posts: 665
- Liked: 4 times
- Joined: Nov 21, 2013 12:02 pm
- Full Name: Babak Seyedi nejad
- Contact:
Re: How can run linux script for surebackup
so thanks
1-but i just write one script with name sure.sh i don't have wrapper.bat script
2- what is your means from vmip? my ip adress of vm that i have get backup that is 10.10.50.67
BR
1-but i just write one script with name sure.sh i don't have wrapper.bat script
2- what is your means from vmip? my ip adress of vm that i have get backup that is 10.10.50.67
BR
-
- Veteran
- Posts: 665
- Liked: 4 times
- Joined: Nov 21, 2013 12:02 pm
- Full Name: Babak Seyedi nejad
- Contact:
Re: How can run linux script for surebackup
about question2 :
is that your means do i have to use from 10.10.50.67 instead of %vm_ip% ?
do i have to put ip address between %% or don't need use from %% ?
BR
is that your means do i have to use from 10.10.50.67 instead of %vm_ip% ?
do i have to put ip address between %% or don't need use from %% ?
BR
-
- Veteran
- Posts: 665
- Liked: 4 times
- Joined: Nov 21, 2013 12:02 pm
- Full Name: Babak Seyedi nejad
- Contact:
Re: How can run linux script for surebackup
1- my vm's ip that get backup from that is 10.10.50.67
2- create a bat file in windows and this is contain in bat file :
"C:\Program Files\Veeam\Backup and Replication\Backup\Putty"\putty.exe -ssh root@10.10.50.67 -pw password -m C:\Users\Administrator\Desktop\123\sure.sh
3- my production network connection is : 10.10.50.70 - 255.255.255.224 Gw= 10.10.50.65
now i don't know what do i have to write in argument filed
BR
Babak
2- create a bat file in windows and this is contain in bat file :
"C:\Program Files\Veeam\Backup and Replication\Backup\Putty"\putty.exe -ssh root@10.10.50.67 -pw password -m C:\Users\Administrator\Desktop\123\sure.sh
3- my production network connection is : 10.10.50.70 - 255.255.255.224 Gw= 10.10.50.65
now i don't know what do i have to write in argument filed
BR
Babak
-
- Veteran
- Posts: 665
- Liked: 4 times
- Joined: Nov 21, 2013 12:02 pm
- Full Name: Babak Seyedi nejad
- Contact:
Re: How can run linux script for surebackup
can anyone help me?
-
- Veeam Software
- Posts: 1818
- Liked: 655 times
- Joined: Mar 02, 2012 1:40 pm
- Full Name: Timothy Dewin
- Contact:
Re: How can run linux script for surebackup
%vm_ip% is an automatic parameter that will be filled in when you put it in the argument field in backup & replication and will be the external address of the VM that is in the lab environment
-
- Veteran
- Posts: 665
- Liked: 4 times
- Joined: Nov 21, 2013 12:02 pm
- Full Name: Babak Seyedi nejad
- Contact:
Re: How can run linux script for surebackup
is that your means in argument field just write %vm_ip% or have to write ip address ?????
BR
BR
-
- Veeam Software
- Posts: 1818
- Liked: 655 times
- Joined: Mar 02, 2012 1:40 pm
- Full Name: Timothy Dewin
- Contact:
Re: How can run linux script for surebackup
it's a dynamic parameter that will be filled in automatically so you write %vm_ip%
-
- Veteran
- Posts: 665
- Liked: 4 times
- Joined: Nov 21, 2013 12:02 pm
- Full Name: Babak Seyedi nejad
- Contact:
Re: How can run linux script for surebackup
it won't correctly
my 1.bat script is :
"C:\Program Files\Veeam\Backup and Replication\Backup\Putty"\putty.exe -ssh root@172.20.68.74 -pw password -m C:\Script\sure.sh
and my sure.sh is :
#!/bin/bash
mkdir -p /tmp/surerplicaaaaaasssssaaaaaaa
and in argument field write : %vm_ip%
but it don't succeed and more than 20min that show in progress in script part checking heartbeat and ping success what is my problem ?
see picture
https://pasteboard.co/H5dfP8d.jpg
my 1.bat script is :
"C:\Program Files\Veeam\Backup and Replication\Backup\Putty"\putty.exe -ssh root@172.20.68.74 -pw password -m C:\Script\sure.sh
and my sure.sh is :
#!/bin/bash
mkdir -p /tmp/surerplicaaaaaasssssaaaaaaa
and in argument field write : %vm_ip%
but it don't succeed and more than 20min that show in progress in script part checking heartbeat and ping success what is my problem ?
see picture
https://pasteboard.co/H5dfP8d.jpg
-
- Veteran
- Posts: 665
- Liked: 4 times
- Joined: Nov 21, 2013 12:02 pm
- Full Name: Babak Seyedi nejad
- Contact:
Re: How can run linux script for surebackup
can anyone help me plz?
BR
BR
-
- Veeam Software
- Posts: 1818
- Liked: 655 times
- Joined: Mar 02, 2012 1:40 pm
- Full Name: Timothy Dewin
- Contact:
Re: How can run linux script for surebackup
In veeam you pass the parameter %vm_ip% to your bat script
In your bat script, you can use that parameter as %1 I believe (http://www.robvanderwoude.com/parameters.php) because it is passed as the first argument. So you should be able to do something like
In your bat script, you can use that parameter as %1 I believe (http://www.robvanderwoude.com/parameters.php) because it is passed as the first argument. So you should be able to do something like
Code: Select all
"C:\path\to\putty\putty.exe" -ssh root@%1
-
- Veteran
- Posts: 665
- Liked: 4 times
- Joined: Nov 21, 2013 12:02 pm
- Full Name: Babak Seyedi nejad
- Contact:
Re: How can run linux script for surebackup
is that necessary use %vm_ip% in argument field ? and the other question is why that stop in progress more that 30min?
BR
BR
-
- Veeam Software
- Posts: 1818
- Liked: 655 times
- Joined: Mar 02, 2012 1:40 pm
- Full Name: Timothy Dewin
- Contact:
Re: How can run linux script for surebackup
no, you can just remove the %vm_ip% and put a fixed ip in the batch script. But make sure to put the masked IP and not the production IP, so your script is not connecting to your production server
-
- Veteran
- Posts: 665
- Liked: 4 times
- Joined: Nov 21, 2013 12:02 pm
- Full Name: Babak Seyedi nejad
- Contact:
-
- Product Manager
- Posts: 6551
- Liked: 765 times
- Joined: May 19, 2015 1:46 pm
- Contact:
Re: How can run linux script for surebackup
just replace the second octet of your production IP with 29. For example, assume that your VMs production IP is 172.20.X.Y, then your masquerade IP will be 172.29.X.Y
Thanks
Thanks
-
- Veteran
- Posts: 665
- Liked: 4 times
- Joined: Nov 21, 2013 12:02 pm
- Full Name: Babak Seyedi nejad
- Contact:
Re: How can run linux script for surebackup
thanks
but you said put the masked IP and not the production IP in bat script file now what ip adress do i have to put in bat file ?
BR
but you said put the masked IP and not the production IP in bat script file now what ip adress do i have to put in bat file ?
BR
-
- Product Manager
- Posts: 6551
- Liked: 765 times
- Joined: May 19, 2015 1:46 pm
- Contact:
Re: How can run linux script for surebackup
You should put the masquerade IP in the .bat file. If you put production IP, then the script will attempt to connect to the production VM, which is clearly not what you want.
Thanks
Thanks
-
- Veteran
- Posts: 665
- Liked: 4 times
- Joined: Nov 21, 2013 12:02 pm
- Full Name: Babak Seyedi nejad
- Contact:
Re: How can run linux script for surebackup
okPTide wrote:You should put the masquerade IP in the .bat file. If you put production IP, then the script will attempt to connect to the production VM, which is clearly not what you want.
Thanks
i understand your means but now want to know according that pic my msq ip address is : 172.29.C.D
now what ip address do i have to put in .bat file ?
what is my masquerade IP ?
BR
-
- Product Manager
- Posts: 6551
- Liked: 765 times
- Joined: May 19, 2015 1:46 pm
- Contact:
Re: How can run linux script for surebackup
172.29.C.D is a template for IP masquerading. That is, if your production VM has IP 172.20.68.10, then its corresponding masquerade IP would be 172.29.68.10. If some other VM has, for example, IP 172.20.50.12, then the masquerade IP would be 172.29.50.12, and so on. Please check this example.
Thanks
Thanks
-
- Veteran
- Posts: 665
- Liked: 4 times
- Joined: Nov 21, 2013 12:02 pm
- Full Name: Babak Seyedi nejad
- Contact:
Re: How can run linux script for surebackup
thanks
but when i changed my masq ip appear this error : my producion vm ip is : 172.20 68.74 255.255.255.224 172.20.68.65
[img]
https://pasteboard.co/H5tmsUc.jpg
[/img]
but when i changed my masq ip appear this error : my producion vm ip is : 172.20 68.74 255.255.255.224 172.20.68.65
[img]
https://pasteboard.co/H5tmsUc.jpg
[/img]
-
- Product Manager
- Posts: 6551
- Liked: 765 times
- Joined: May 19, 2015 1:46 pm
- Contact:
Re: How can run linux script for surebackup
You should not replace the letters in IP address in the wizard. "C" and "D" represent corresponding octets of your production IP addresses, they will be substituted with proper values automatically depending on the IP. Provided that you have three VMs in production, it will work as follows:
|_VM__| ProductionIP | Masqu.___IP |
|_VM1_| 172.20.68.10 | 172.29.68.10 |
|_VM2_| 172.20.68.11 | 172.29.68.11 |
|_VM3_| 172.20.70.12 | 172.29.70.12 |
Thanks
|_VM__| ProductionIP | Masqu.___IP |
|_VM1_| 172.20.68.10 | 172.29.68.10 |
|_VM2_| 172.20.68.11 | 172.29.68.11 |
|_VM3_| 172.20.70.12 | 172.29.70.12 |
Thanks
-
- Veteran
- Posts: 665
- Liked: 4 times
- Joined: Nov 21, 2013 12:02 pm
- Full Name: Babak Seyedi nejad
- Contact:
Re: How can run linux script for surebackup
thanks but confused
please see my config :
my virtual lab proxy setting is this
https://pasteboard.co/H5tPGX0.jpg
my isolated config in virtual lab is :
https://pasteboard.co/H5tQMAH.jpg
and my network setting in virtual lab is :
https://pasteboard.co/H5tRnc8.jpg
and this is my script that i put it in surebackup job
and this is my .bat script but another can not success for script and wait in progress what is the problem?
"C:\Program Files\Veeam\Backup and Replication\Backup\Putty"\putty.exe -ssh root@172.31.255.224 -pw password -m C:\Script\sure.sh
https://pasteboard.co/H5u4ymP.jpg
but i can not ping 172.31.255.224
and in vcenter just have 2vms:
1-bakaml_da43472f8ff145318f0022919918914c with ip = 172.20.68.74
2- Virtual_Labamlscript with ip = 172.20.68.68
and don't have any vm with ip 172.31.255.224
BR
please see my config :
my virtual lab proxy setting is this
https://pasteboard.co/H5tPGX0.jpg
my isolated config in virtual lab is :
https://pasteboard.co/H5tQMAH.jpg
and my network setting in virtual lab is :
https://pasteboard.co/H5tRnc8.jpg
and this is my script that i put it in surebackup job
and this is my .bat script but another can not success for script and wait in progress what is the problem?
"C:\Program Files\Veeam\Backup and Replication\Backup\Putty"\putty.exe -ssh root@172.31.255.224 -pw password -m C:\Script\sure.sh
https://pasteboard.co/H5u4ymP.jpg
but i can not ping 172.31.255.224
and in vcenter just have 2vms:
1-bakaml_da43472f8ff145318f0022919918914c with ip = 172.20.68.74
2- Virtual_Labamlscript with ip = 172.20.68.68
and don't have any vm with ip 172.31.255.224
BR
-
- Veteran
- Posts: 665
- Liked: 4 times
- Joined: Nov 21, 2013 12:02 pm
- Full Name: Babak Seyedi nejad
- Contact:
Re: How can run linux script for surebackup
my masq ip now is 172.31.C.D
and when i run job this ip has ping and could ssh to that 172.31.68.74 but my problem is script not run via sure replica job
i am sure .bat file is correct because when i run 1.bat file it will connect to 172.31.68.74 and run sure.sh script
do i have to just add script in sure backup job or also have to use that when create application group ?
BR
and when i run job this ip has ping and could ssh to that 172.31.68.74 but my problem is script not run via sure replica job
i am sure .bat file is correct because when i run 1.bat file it will connect to 172.31.68.74 and run sure.sh script
do i have to just add script in sure backup job or also have to use that when create application group ?
BR
Who is online
Users browsing this forum: Bing [Bot], Semrush [Bot] and 56 guests