Git repository takes as much space as every version of your files, compressed. If you're planning to archive precompressed data like photos, be prepared for enormous .git growth.
As of 2011 Git does not use binary diffs like, for example, Subversion, and stores binary files as they are, compressed.
If you're short of disk space consider using other, more efficient in terms of disk space usage, specialized backup solutions. Borg, attic, restic, duplicity, zbackup come to mind.
It's a pretty decent solution, and much better than nothing. Dead simple too, if you're familiar with git.
One downside is that history will be kept forever; there's no easy way to roll off older, stale versions of files, or even to thin older versions. For example, you might like to discard everything older than 3 years, and anything older than a year you only want monthly snapshots. So your backup will continuously grow until it consumes your entire disk.
发布评论
评论(2)
Git 存储库占用的空间与压缩后的文件的每个版本一样多。如果您计划归档照片等预压缩数据,请为
.git
的巨大增长做好准备。截至 2011 年,Git 不再像 Subversion 那样使用二进制差异,而是按原样存储压缩的二进制文件。
如果磁盘空间不足,请考虑使用其他在磁盘空间使用方面更高效的专用备份解决方案。 博格,阁楼,restic,口是心非,zbackup< /a> 浮现在脑海中。
Git repository takes as much space as every version of your files, compressed. If you're planning to archive precompressed data like photos, be prepared for enormous
.git
growth.As of 2011 Git does not use binary diffs like, for example, Subversion, and stores binary files as they are, compressed.
If you're short of disk space consider using other, more efficient in terms of disk space usage, specialized backup solutions. Borg, attic, restic, duplicity, zbackup come to mind.
这是一个相当不错的解决方案,比没有好得多。如果您熟悉 git,那也很简单。
缺点之一是历史将被永远保留;没有简单的方法可以淘汰旧的、过时的文件版本,甚至精简旧版本。例如,您可能希望丢弃超过 3 年的所有内容,而您只需要每月快照的任何超过一年的内容。因此,您的备份将不断增长,直到耗尽整个磁盘。
It's a pretty decent solution, and much better than nothing. Dead simple too, if you're familiar with git.
One downside is that history will be kept forever; there's no easy way to roll off older, stale versions of files, or even to thin older versions. For example, you might like to discard everything older than 3 years, and anything older than a year you only want monthly snapshots. So your backup will continuously grow until it consumes your entire disk.