IndigoOS/backup.sh
2021-03-19 10:54:25 -05:00

14 lines
188 B
Bash
Executable File

#!/bin/bash
if [ $# -ne 1 ]
then
echo "Usage: $0 [file suffix]"
exit 1
fi
archive_name=$(date +%m.%d.%y."$1".tar)
shopt -s extglob
tar -cf $archive_name !(*gz)
pigz -9 $archive_name