OpenBagTwo / gsb

A tool for managing incremental backups of your save states using Git!
https://openbagtwo.github.io/gsb/
GNU General Public License v3.0
0 stars 0 forks source link

Implement exporting of backups #48

Closed OpenBagTwo closed 9 months ago

OpenBagTwo commented 9 months ago

Summary

Resolves #10 via a new verb: gsb export which supports creating an archive of any revision in the Git history in either zip or tar (including compressed tar) format.

List of Changes

Tech Debt and Other Concerns

gsb export can be slow (for example, exporting a 3GB backup to a tar.xz). I don't believe tarfile supports multithreading, and I don't even know for certain that it doesn't require holding the entire tarball in memory during compression. Probably the best practice for power-users will be to export as uncompressed tar and then use xz standalone to perform the compression. This is something I may play with.

Export does not support ZIP archives that contain symlinks. That's a limitation of the zipfile library (see: https://bugs.python.org/issue37921). Given that ZIP is the default format for Windows users, I'm hoping that symlinks-in-backups is relatively rare / something that's easily mitigated by using a format flag.

Validation Performed

PR Type

Checklist:

OpenBagTwo commented 9 months ago

Very pleased--and only slightly surprised--that all the various compression options are supported on Windows--I would not have been shocked if I needed to xfail some of those tests.