ok tr y this
This commit is contained in:
parent
bd9f706d76
commit
1c426f81c2
|
@ -3,13 +3,13 @@
|
||||||
source /.env
|
source /.env
|
||||||
|
|
||||||
FILENAME="$NAME $(date +%Y-%m-%d\ %H-%M).tgz"
|
FILENAME="$NAME $(date +%Y-%m-%d\ %H-%M).tgz"
|
||||||
|
DIRNAME = "/tmp/$(date +%Y\/%m)"
|
||||||
# tar volumes
|
# tar volumes
|
||||||
tar -aczf "/tmp/$FILENAME" -C /volumes .
|
tar -aczf "$DIRNAME/$FILENAME" -C /volumes .
|
||||||
|
|
||||||
# ship to host
|
# ship to host
|
||||||
cd /tmp
|
cd /tmp
|
||||||
rsync -R -e "ssh -i /id" --include="$FILENAME" $NAME@$HOST:/home/$NAME/$(date +%Y-%m)/
|
rsync -r -e "ssh -i /id" . $NAME@$HOST:/home/$NAME/
|
||||||
|
|
||||||
# delete backup
|
# delete backup
|
||||||
rm -rf /tmp/*
|
rm -rf $DIRNAME
|
Loading…
Reference in a new issue