10 lines
278 B
Bash
10 lines
278 B
Bash
#!/bin/bash
|
|
DATE=$(date +%Y%m%d-%Hh%M)
|
|
LOGFILE=/home/johannes/.var/log/root-${DATE}-backup.log
|
|
touch $LOGFILE 2>&1
|
|
pushd /etc
|
|
sudo git add /etc/* >> $LOGFILE 2>&1
|
|
sudo git commit -m "backup-${DATE}" >> $LOGFILE 2>&1
|
|
sudo chown -R johannes:johannes .git >> $LOGFILE 2>&1
|
|
popd
|