backup : replace tar.gz with tgz.
This commit is contained in:
parent
52fe96108b
commit
c9eb75335a
|
@ -36,7 +36,7 @@ builtin cd "$path_src"
|
|||
|
||||
# backup docker.
|
||||
rm $path_docker/${dow}_*.tgz
|
||||
/usr/bin/tar --exclude-from=docker/.tarignore -c docker | /usr/bin/gzip -1 > $path_docker/docker.tar.gz && mv $path_docker/docker.tar.gz $path_docker/${dow}_${date}-$(/usr/bin/sha1sum $path_docker/docker.tar.gz | cut -d\ -f1).tar.gz || notify 'backup : docker failed'
|
||||
/usr/bin/tar --exclude-from=docker/.tarignore -c docker | /usr/bin/gzip -1 > $path_docker/docker.tgz && mv $path_docker/docker.tgz $path_docker/${dow}_${date}-$(/usr/bin/sha1sum $path_docker/docker.tgz | cut -d\ -f1).tgz || notify 'backup : docker failed'
|
||||
|
||||
# copy media.
|
||||
/usr/bin/rsync -a --delete /var/mnt/storage/hot/media/music/ /var/mnt/backup/backup/music/ || notify 'backup : copy music failed'
|
||||
|
@ -50,6 +50,6 @@ rm $path_docker/${dow}_*.tgz
|
|||
#/usr/bin/rsync -ahP -e 'ssh -p 143 -i /var/roothome/document/key/ssh/pi.key' /var/mnt/backup/ root@192.168.1.6:/var/mnt/backup/ || notify 'backup : failed upload'
|
||||
|
||||
# notify completion & size.
|
||||
bupsize=$(/usr/bin/du -h $path_docker/${dow}_*.tar.gz | awk '{print $1}')
|
||||
bupsize=$(/usr/bin/du -h $path_docker/${dow}_*.tgz | awk '{print $1}')
|
||||
notify_silent "backup : complete : $bupsize"
|
||||
echo "backup : complete : $bupsize"
|
||||
|
|
Reference in a new issue