Omits the verbose option for gzip in the backup script
The verbose option dumps a progress percentage to `STDERR`. I'm piping `STDOUT` to `/dev/null` in my backup cron job but I'd like to keep `STDERR` in case something goes wrong. However because the progress gets dumped to `STDERR` by gzip it means it will always look like something went _wrong_.master
parent
7665cc2ae7
commit
91ff9db147
|
@ -64,32 +64,32 @@ function backup() {
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
-v ${BACKUP_LOCATION}/mailcow-${DATE}:/backup \
|
-v ${BACKUP_LOCATION}/mailcow-${DATE}:/backup \
|
||||||
-v $(docker volume ls -qf name=${CMPS_PRJ}_vmail-vol-1):/vmail:ro \
|
-v $(docker volume ls -qf name=${CMPS_PRJ}_vmail-vol-1):/vmail:ro \
|
||||||
debian:stretch-slim /bin/tar --warning='no-file-ignored' --use-compress-program="gzip --rsyncable -v --best" -Pcvpf /backup/backup_vmail.tar.gz /vmail
|
debian:stretch-slim /bin/tar --warning='no-file-ignored' --use-compress-program="gzip --rsyncable --best" -Pcvpf /backup/backup_vmail.tar.gz /vmail
|
||||||
;;&
|
;;&
|
||||||
crypt|all)
|
crypt|all)
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
-v ${BACKUP_LOCATION}/mailcow-${DATE}:/backup \
|
-v ${BACKUP_LOCATION}/mailcow-${DATE}:/backup \
|
||||||
-v $(docker volume ls -qf name=${CMPS_PRJ}_crypt-vol-1):/crypt:ro \
|
-v $(docker volume ls -qf name=${CMPS_PRJ}_crypt-vol-1):/crypt:ro \
|
||||||
debian:stretch-slim /bin/tar --warning='no-file-ignored' --use-compress-program="gzip --rsyncable -v --best" -Pcvpf /backup/backup_crypt.tar.gz /crypt
|
debian:stretch-slim /bin/tar --warning='no-file-ignored' --use-compress-program="gzip --rsyncable --best" -Pcvpf /backup/backup_crypt.tar.gz /crypt
|
||||||
;;&
|
;;&
|
||||||
redis|all)
|
redis|all)
|
||||||
docker exec $(docker ps -qf name=redis-mailcow) redis-cli save
|
docker exec $(docker ps -qf name=redis-mailcow) redis-cli save
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
-v ${BACKUP_LOCATION}/mailcow-${DATE}:/backup \
|
-v ${BACKUP_LOCATION}/mailcow-${DATE}:/backup \
|
||||||
-v $(docker volume ls -qf name=${CMPS_PRJ}_redis-vol-1):/redis:ro \
|
-v $(docker volume ls -qf name=${CMPS_PRJ}_redis-vol-1):/redis:ro \
|
||||||
debian:stretch-slim /bin/tar --warning='no-file-ignored' --use-compress-program="gzip --rsyncable -v --best" -Pcvpf /backup/backup_redis.tar.gz /redis
|
debian:stretch-slim /bin/tar --warning='no-file-ignored' --use-compress-program="gzip --rsyncable --best" -Pcvpf /backup/backup_redis.tar.gz /redis
|
||||||
;;&
|
;;&
|
||||||
rspamd|all)
|
rspamd|all)
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
-v ${BACKUP_LOCATION}/mailcow-${DATE}:/backup \
|
-v ${BACKUP_LOCATION}/mailcow-${DATE}:/backup \
|
||||||
-v $(docker volume ls -qf name=${CMPS_PRJ}_rspamd-vol-1):/rspamd:ro \
|
-v $(docker volume ls -qf name=${CMPS_PRJ}_rspamd-vol-1):/rspamd:ro \
|
||||||
debian:stretch-slim /bin/tar --warning='no-file-ignored' --use-compress-program="gzip --rsyncable -v --best" -Pcvpf /backup/backup_rspamd.tar.gz /rspamd
|
debian:stretch-slim /bin/tar --warning='no-file-ignored' --use-compress-program="gzip --rsyncable --best" -Pcvpf /backup/backup_rspamd.tar.gz /rspamd
|
||||||
;;&
|
;;&
|
||||||
postfix|all)
|
postfix|all)
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
-v ${BACKUP_LOCATION}/mailcow-${DATE}:/backup \
|
-v ${BACKUP_LOCATION}/mailcow-${DATE}:/backup \
|
||||||
-v $(docker volume ls -qf name=${CMPS_PRJ}_postfix-vol-1):/postfix:ro \
|
-v $(docker volume ls -qf name=${CMPS_PRJ}_postfix-vol-1):/postfix:ro \
|
||||||
debian:stretch-slim /bin/tar --warning='no-file-ignored' --use-compress-program="gzip --rsyncable -v --best" -Pcvpf /backup/backup_postfix.tar.gz /postfix
|
debian:stretch-slim /bin/tar --warning='no-file-ignored' --use-compress-program="gzip --rsyncable --best" -Pcvpf /backup/backup_postfix.tar.gz /postfix
|
||||||
;;&
|
;;&
|
||||||
mysql|all)
|
mysql|all)
|
||||||
SQLIMAGE=$(grep -iEo '(mysql|mariadb)\:.+' ${COMPOSE_FILE})
|
SQLIMAGE=$(grep -iEo '(mysql|mariadb)\:.+' ${COMPOSE_FILE})
|
||||||
|
|
Loading…
Reference in New Issue