first commit

This commit is contained in:
Alexander 2023-01-23 12:04:24 +00:00
parent d0257e3743
commit 382ee61ed7
1 changed files with 21 additions and 0 deletions

21
backup_cosmicvoyage Executable file
View File

@ -0,0 +1,21 @@
#! /bin/bash
SHIPS=~/ships
BACKUP=~/backup-ships
test -d $SHIPS || (echo "ships does not exit" ; exit 1)
test -d $BACKUP || mkdir $BACKUP
cd $SHIPS
TS=`date -u +%Y-%m-%dZ%H:%M`
TGZ="$BACKUP/ships-$TS.tar.gz"
echo backing up $SHIPS to $TGZ
tar cvfz $TGZ */*.txt */LICENSE
test -f $TGZ && echo backup of file $TGZ was successful