diff options
Diffstat (limited to 'backup.sh')
-rwxr-xr-x | backup.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/backup.sh b/backup.sh new file mode 100755 index 0000000..74c3189 --- /dev/null +++ b/backup.sh @@ -0,0 +1,13 @@ +#!/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 + + |