Kaseya Community

conditional backup for laptop

  • Hi

    I am trying to achieve a backup prescript to change image location. So, IF the machine is in 192.168.x.x network, change\set the image location to \\192.168.1.200\backup\ but ELSE set to 172.16.1.200\backup\

    I could not find a variable of image location within backup system script.
    Anyone has any idea?

    Thanks

    Legacy Forum Name: conditional backup for laptop,
    Legacy Posted By Username: ptun
  • how about trying this for your pre-script ... run the command line ipconfig >> ip.txt then get the ip.txt file and parse it for the ip address and create that as your variable, then branch based on the ip to backup to the proper location ... should work ...

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: TBK Consulting
  • TBK is correct. You can also use the builtin variable for Connection Gateway (or default gateway if you prefer) to accomplish this instead of a file.

    #vMachine.ConnectionGatewayIp#
    or
    #vMachine.DefaultGateway#

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: SMason
  • Ah, then I guess actually setting the image location would be next. I'm drawing a blank on how to set #imageLoc# from a script... You might need to make a custom backup script instead of using the BUDR interface.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: SMason
  • Yes My friends..

    #imageLoc# from BackupParams Table is the one to change... but I could not find a way to SET (change) imageLoc from a script.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: ptun