docker run --rm --volumes-from container_name -v $(pwd):/backup ubuntu bash -c 'BACKUP_PATH=`date +/backup/db_name_%Y_%m_%d_%H_%M_%S.tar`; echo $BACKUP_NAME; tar cvf $BACKUP_PATH /var/log/mysql; chown 1000:1000 $BACKUP_PATH'

 

DevOps