Check the timezone on server

To check the timezone on the server.

Run the below

catĀ /etc/sysconfig/clock

batch script to check for file mapping and remap if disconnected

The below script was set to check for a specific file mapping that was disconnecting. If detected it will then remap the drive.

Simply change the s part in s:null to your drive letter and then add in the Email and mapping details which are highlighted in caps with the hyphen (eg EMAIL-HERE)

if exist s:nul if exist map.lock del map.lock & goto END

if exist map.lock goto END

if exist s:nul goto END
print "drive not mapped"
blat -to "EMAIL-HERE" -server SMTP-HERE -f -subject "Mapping Failed" -body "drive Mapping Failed/disconnected"
echo & map.lock

rsync folder with sync

To run an rsync from a remote server to a local one and sync the files.

Run the below command

rsync -avz user@server:/tmp/test /tmp/test

Also you can show a progress option with the below addition

rsync -avz --progress user@server:/tmp/test /tmp/test

And add a bandwidth limiter if needed

rsync -avz --bwlimit=100000 user@server:/tmp/test /tmp/test