DX Infrastructure Management

 View Only

NAS Script to sync ADE 

Sep 12, 2018 06:49 PM

This script builds on the NAS script to sync distsrv thread but uses the ade for processing instead. In addition, you don't need to specify the slaves as the script will grab all running and active ades for you that aren't the master. You can either supply the master via a parameter or it will use the ade from the nas where the script is run as the master if no parameters are specified. It will also write the results to a separate log file in the nas directory.

 

I made a few small changes to the script output. It will now also state how many slaves it processed. Also, I made the filename a local variable.

 

--------------------------------------------------------------------------------------------------
-- script : sync-ade.lua
-- author : Dan Gill
-- September 2018
-- version: 1.1
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-- desc   : The intention of this script is to synchronize ade probes by deleting packages from  
-- slaves that are not present on master. (The ade probe automatically replicates packages from the
-- master to the slaves but does not delete automatically.)
-- This script should be run by the nas with an argument passed to it. The argument must be the
-- master ade name in the format /DOMAIN/HUB/ROBOT
-- Alternatively, the script may be run manually and will use the ade probe located on the hub the
-- script is run from. The folder "script_logs" *MUST* be manually created under the nas
-- directory prior to running this script.
---------------------------------------------------------------------------------------------------        
---------------------------------------------------------------------------------------------------
-- Version  | Details
---------------------------------------------------------------------------------------------------
-- 1.0      | Initial Version
-- 1.1      | 9/20/2018 - Replace dofile with require and added package.path update; this makes
--            passing the path to the includes files simpler. Swapped out file.write and print
--            statements with output function from logging_functions.
---------------------------------------------------------------------------------------------------

Statistics
0 Favorited
4 Views
1 Files
0 Shares
6 Downloads
Attachment(s)
zip file
sync-ade.lua.zip   2 KB   1 version
Uploaded - May 29, 2019

Tags and Keywords

Related Entries and Links

No Related Resource entered.