Compare commits

...

2 Commits

Author SHA1 Message Date
Alexander a9abe4bec1 update readme 2023-01-23 12:10:36 +00:00
Alexander 382ee61ed7 first commit 2023-01-23 12:04:24 +00:00
3 changed files with 30 additions and 2 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
# emacs backups
*~
\#*\#

View File

@ -1,4 +1,10 @@
# cosmicvoage-backup
A simple script to backup the cosmic voyage files dir to a dir in the home dir
A simple script to backup the cosmic voyage files dir to a dir in the home dir
To use the script, either run in manually or put it into your crontab
$ crontab -e
0 1 * * * $HOME/bin/backup_cosmicvoyage

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