#!/bin/bash
sudo id
#vm=$HOSTNAME
dt=$(printf '%(%Y.%m.%d)T\n' -1)
mkdir -p nginx_bb_${dt}/nginx
mkdir -p nginx_bb_${dt}/opt
mkdir -p nginx_bb_${dt}/fluent-bit
mkdir -p nginx_bb_${dt}/rsyslog
echo "Folders created. Start copy process"
sudo cp -r /etc/nginx nginx_bb_${dt}/
sudo cp -r /opt/nginx nginx_bb_${dt}/opt
#sudo cp -r /opt/mp nginx_bb_${dt}/opt
sudo cp -r /etc/fluent-bit nginx_bb_${dt}/
sudo cp -r /etc/rsyslog.d/nginx.conf nginx_bb_${dt}/rsyslog/
echo "Copy completed"

