Initial commit
This commit is contained in:
11
kapitel15/sidan_294_ex1.sh
Normal file
11
kapitel15/sidan_294_ex1.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
PATH="/bin:/sbin:/usr/bin:/usr/sbin"
|
||||
|
||||
today=$(date '+%Y%m%d')
|
||||
folderToBackup="/home/kalle"
|
||||
targetFolder="/backups"
|
||||
backupname="kalle"
|
||||
backupLog="/root/backup-$today.log"
|
||||
|
||||
tar cvf ${targetFolder}/${backupname}-${today}.tar \
|
||||
${folderToBackup} &> ${backupLog}
|
Reference in New Issue
Block a user