offen / docker-volume-backup

Backup Docker volumes locally or to any S3, WebDAV, Azure Blob Storage, Dropbox or SSH compatible storage
https://offen.github.io/docker-volume-backup/
Mozilla Public License 2.0
2.07k stars 86 forks source link

Local tar.gz archive creation bypass #316

Open Adam-PP opened 11 months ago

Adam-PP commented 11 months ago

Hi everyone, Can you tell me please if there is a way to create a tar.gz archive file bypassing it's local copy? I know that at the first step the file is beeing created at /tmp then it is copied to the destination folder and locally deleted from /tmp I just want to create a backup tar.gz archive directly in destination without temporary local copy. Is there any workaround? Thanks in advance for the reply, Adam

m90 commented 11 months ago

This is currently not supported as the code tries to be "backend-agnostic" and storing the archive locally is just another storage backend.

I could imagine that it makes sense to add an opt-in option that supports the behavior you describe where the archive gets created in the local directory if it's available. Not sure about the name / configuration for this feature though.

Adam-PP commented 10 months ago

Thanks for information. I have one more question. Is there an option to configure backup using Offen solution to create tar.gz but locally? I know that there is an option:

BACKUP_ARCHIVE="/archive"

but when it is set, Offen still creates temporary file in /tmp directory or when you are using local copies step of creating file in /tmp directory is bypassed?

The goal is to not create temporary file in /tmp but in other local directory.

m90 commented 10 months ago

No, as already written in my previous comment, there is no way to do what you describe.

MaxJa4 commented 10 months ago

When streaming is implemented like in #95 of some sort, the temp file may be obsolete and there this resolved. Depends on the implementation of #95 though. Just mentioning it to be potentially related to this issue.