gmentsik / docktartar Goto Github PK
View Code? Open in Web Editor NEWDocker container for periodically and recursively taring docker volumes.
License: MIT License
Docker container for periodically and recursively taring docker volumes.
License: MIT License
Hi,
I have a few containers I do not want to be stopped, nor backupped.
For instance I have a time-server where backup is kindoff useless, and secondly a dns-server I want only backupped when the secndary is up.
Is not stopping certain containers doable or will it lock certain volumes so that the backup might go wrong?
Secondly I was wondering if Dar might be a bit more efficient.
Finally, great work, will be testing !
Is there a way to include Container Binds in the Backup?
Hi,
I am trying to send a test email message but that fails with the docker-compose.yml you provide.
The last line should be deleted when sending email, or there is no email.
Secondly. I want to send email without authentication. Is it possible to provide an environmental variable like
EMAIL_AUTH "false"?
when I leave the authuser blanc apparently it uses auth anyway:
root@core containers/BACKUP2017-10-07# docker exec -it backup_docktartar_1 /root/test-mail.sh
Sending test email
ssmtp: Server didn't like our AUTH LOGIN (500 Unrecognized command)
Could not send email, ssmtp returned a non-zero code!
If I delete the line with autjuser form ssmtp.conf the test goes fine:
root@core containers/BACKUP2017-10-07# docker exec -it backup_docktartar_1 /root/test-mail.sh
Sending test email
Success
ssmtp.conf then is:
root=[email protected]
mailhub=192.168.0.1:25
UseSTARTTLS=NO
FromLineOverride=YES
Hi,
the email sent are empty I am afraid
This is what the email source looks like
###############################################
Received: by ba0302860cf5 (sSMTP sendmail emulation); Fri, 13 Oct 2017 14:07:11 +0200
Date: Fri, 13 Oct 2017 14:07:11 +0200
From: Docktartar [email protected]
Subject: Docktartar
################################################
I also get a number of completely empty emails from root.
running a backup by hand show this:
docker exec -it backup_docktartar_1 /root/docktartar.sh
From: Docktartar [email protected]
Subject: Docktartar
Starting Backup - Fri Oct 13 14:39:30 CEST 2017 .
Mounting the SMB share
Error response from daemon: No such container: nextcloud
Stopping
Looking for sockets to exclude them from the archive...
Creating TAR-Archive from /backupSource
Error response from daemon: No such container: nextcloud
Error: failed to start containers: nextcloud
Restarting
Chown the archive
chown: /backupTarget/dockertar.14.39.30-13.10.17.tar.gz: Permission denied
Archive size: 64.0K
Unmounting the SMB share
Backup dockertar took 0 minutes and 14 seconds.
Sending email to [email protected]
Finished.
Hi,
I think the mount line in /root/docktartar.sh should use
password
no
passwd
If so please update the docktartar.sh script.
when running:
docker exec -it backup_docktartar_1 /root/docktartar.sh
it says:
smb mount is 192.168.0.36/share
Mounting the SMB share
Unable to set current process capabilities: Operation not permitted
mount: permission denied (are you root?)
My docker-compose.yml says:
TAR_OWNER_USERID: 0
TAR_OWNER_GROUPID: 0
Should I change these user ID's or something?
when I log into the container and run by hand:bash-4.3# mount -t cifs -o username=rem,passwd=Seclet //192.168.0.66/share /backupTarget
Unable to set current process capabilities: Operation not permitted
mount: permission denied (are you root?)
bash-4.3# id
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)
bash-4.3# id
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.