scripts/bkp_cluster_file

22 lines
523 B
Plaintext
Raw Permalink Normal View History

2016-10-14 09:40:07 +02:00
#!/bin/sh
BKP_DIR="${HOME}/bkp_cluster_files"
SSH_USER="root"
NODES_LIST='r720xd.ipr.univ-rennes1.fr r730xd1.ipr.univ-rennes1.fr r730xd2.ipr.univ-rennes1.fr nec06'
FILES_LIST="/etc/network/interfaces /etc/udev/rules.d/70-persistent-net.rules"
mkdir -p "${BKP_DIR}"
for node in r720xd.ipr.univ-rennes1.fr r730xd1.ipr.univ-rennes1.fr r730xd2.ipr.univ-rennes1.fr nec06; do
mkdir -p "${BKP_DIR}"/"${node}"
for file in "${FILES_LIST}"; do
scp "${SSH_USER}"@"${node}":"${file}" "${BKP_DIR}"/"${node}"/
done
done