backup : fix deleting old backups.

This commit is contained in:
Dmitry Voronin 2023-11-14 05:56:07 +03:00
parent 9e2c21d4e9
commit 52fe96108b

View file

@ -35,7 +35,7 @@ builtin cd "$path_src"
/usr/bin/find $path_media -type d | gzip -1 > media/list/cold.txt.gz || notify 'backup : save media list failed' /usr/bin/find $path_media -type d | gzip -1 > media/list/cold.txt.gz || notify 'backup : save media list failed'
# backup docker. # backup docker.
rm $path_docker/${dow}_*.tar.gz 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.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'
# copy media. # copy media.