#!/bin/bash

# Define the source directory
source_dir="/srv/seed/sysres/QrUPMBhH4s9L4IYrFM3QQjJAlYK2j8smD0t8QDrw/esxi8"

# List of servers
servers=("nl" "nyc" "atl" "ash" "dal" "phx" "la")

# Loop through each server
for server in "${servers[@]}"; do
    # Create the esxi8 directory on the destination server if it does not exist
    ssh "$server".mirrors.clouvider.net "mkdir \"$source_dir\""

    # Copy the contents using scp
    scp -r "$source_dir"/* "$server".mirrors.clouvider.net:"$source_dir"/
done

