backup : fix deleting old backups.
This commit is contained in:
parent
9e2c21d4e9
commit
52fe96108b
|
@ -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'
|
||||
|
||||
# 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'
|
||||
|
||||
# copy media.
|
||||
|
|
Reference in a new issue