backup : add recursive for checksum.
This commit is contained in:
parent
f9523f27f2
commit
fe160ddae4
|
@ -4,6 +4,7 @@
|
|||
|
||||
source /var/roothome/.config/bash/module/notify.sh
|
||||
source /var/roothome/.config/bash/module/checksum.sh
|
||||
source /var/roothome/.config/bash/module/recursive.sh
|
||||
|
||||
dow=$(/usr/bin/date +%u) # current day of week number.
|
||||
date=$(/usr/bin/date +%Y%m%d%H%M) # date stamp.
|
||||
|
@ -42,9 +43,9 @@ rm $path_docker/${dow}_*.tgz
|
|||
/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'
|
||||
|
||||
# Update checksums.
|
||||
cd /var/mnt/storage/hot/media/book/ && checksum_create || notify 'Backup : checksum book failed.'
|
||||
cd /var/mnt/storage/hot/media/music/ && checksum_create || notify 'Backup : checksum book failed.'
|
||||
cd /var/mnt/storage/hot/media/paper/ && checksum_create || notify 'Backup : checksum book failed.'
|
||||
cd /var/mnt/storage/hot/media/book/ && recursive checksum_create || notify 'Backup : checksum book failed.'
|
||||
cd /var/mnt/storage/hot/media/music/ && recursive checksum_create || notify 'Backup : checksum book failed.'
|
||||
cd /var/mnt/storage/hot/media/paper/ && recursive checksum_create || notify 'Backup : checksum book failed.'
|
||||
|
||||
# copy media.
|
||||
/usr/bin/rsync -a --delete /var/mnt/storage/hot/media/book/ /var/mnt/backup/backup/tmp/book/ || notify 'backup : copy book failed'
|
||||
|
|
Reference in a new issue