summaryrefslogtreecommitdiff
path: root/backup.sh
diff options
context:
space:
mode:
authorBrett Weiland <brett_weiland@bpcspace.com>2021-03-19 10:54:25 -0500
committerBrett Weiland <brett_weiland@bpcspace.com>2021-03-19 10:54:25 -0500
commit66289aa8ecfa07b20bad424eb9860b196641ef52 (patch)
tree9fb3915b5cb18d9f2c1f4648d3bf3fb56396509f /backup.sh
first commit
Diffstat (limited to 'backup.sh')
-rwxr-xr-xbackup.sh13
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
+
+