I'm working in a memory constrained environment where I need to make archives of SQL dumps. If I use python's built in tarfile
module is the '.tar' file held in memory or written to disk as it's created?
For instance, in the following code, if huge_file.sql
is 2GB will the tar
variable take up 2GB in memory?
import tarfile
tar = tarfile.open("my_archive.tar.gz")), "w|gz")
tar.add('huge_file.sql')
tar.close()