backup : update paths.
This commit is contained in:
parent
abbc6c92bd
commit
ce7ab5a686
|
@ -32,19 +32,17 @@ shopt -s dotglob
|
||||||
builtin cd "$path_src"
|
builtin cd "$path_src"
|
||||||
|
|
||||||
# save media list.
|
# save media list.
|
||||||
/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 > ${path_backup}/tmp/ColdMedia.txt.gz || notify 'backup : save media list failed'
|
||||||
|
|
||||||
# backup docker.
|
# backup docker.
|
||||||
rm $path_docker/${dow}_*.tgz
|
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'
|
/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.
|
# copy media.
|
||||||
/usr/bin/rsync -a --delete /var/mnt/storage/hot/media/music/ /var/mnt/backup/backup/music/ || notify 'backup : copy music failed'
|
/usr/bin/rsync -a --delete /var/mnt/storage/hot/media/book/ /var/mnt/backup/backup/tmp/book/ || notify 'backup : copy book failed'
|
||||||
# /usr/bin/rsync -a --delete /var/mnt/storage/hot/media/book/ /var/mnt/backup/backup/book/ || notify 'backup : copy book failed'
|
/usr/bin/rsync -a --delete /var/mnt/storage/hot/media/music/ /var/mnt/backup/backup/tmp/music/ || notify 'backup : copy music failed'
|
||||||
/usr/bin/rsync -a --delete /var/mnt/storage/hot/media/porn/ /var/mnt/backup/backup/porn/ || notify 'backup : copy porn failed'
|
/usr/bin/rsync -a --delete /var/mnt/storage/hot/media/paper/ /var/mnt/backup/backup/tmp/paper/ || notify 'backup : copy paper failed'
|
||||||
# /usr/bin/rsync -a --delete /var/mnt/storage/hot/media/family/ /var/mnt/backup/backup/family/ || notify 'backup : copy family failed'
|
/usr/bin/rsync -a --delete /var/mnt/storage/hot/media/porn/ /var/mnt/backup/backup/tmp/porn/ || notify 'backup : copy porn failed'
|
||||||
/usr/bin/rsync -a --delete /var/mnt/storage/hot/media/paper/ /var/mnt/backup/backup/paper/ || notify 'backup : copy paper failed'
|
|
||||||
/usr/bin/rsync -a --delete /var/mnt/storage/hot/media/list/ /var/mnt/backup/backup/list/ || notify 'backup : copy list failed'
|
|
||||||
|
|
||||||
# upload external.
|
# upload external.
|
||||||
#/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'
|
#/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'
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
in="/var/roothome/docker/cloud/data/data/cakee/files/media/photo/"
|
in="/var/roothome/docker/cloud/data/data/cakee/files/media/photo/"
|
||||||
out="/var/mnt/backup/backup/family/dima/photo/"
|
out="/var/mnt/backup/backup/tmp/photo/"
|
||||||
|
|
||||||
/usr/bin/docker run --rm -v "${in}":/in -v "${out}":/out voronind.com/photoprocess:latest
|
/usr/bin/docker run --rm -v "${in}":/in -v "${out}":/out voronind.com/photoprocess:latest
|
||||||
|
|
Reference in a new issue