git备份重要文件-为什么不呢? [英] git for important file backup - why not?

查看:135
本文介绍了git备份重要文件-为什么不呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

说我想用Git备份我的PC.

Say I want to use Git to back up my PC.

我不在乎完整的系统备份.如果硬盘驱动器崩溃,我不介意必须重新安装东西.我只想备份我的数据文件,它们都位于一个分区上.

I don't care about a full system backup. I don't mind having to reinstall things if my hard drive crashes. I just want to back up my data files, which are all on one partition.

要备份Git,我可以在该分区上创建一个存储库,将其克隆(裸露)在单独的驱动器或系统上,并定期提交并推送以备份我的文件.

To back up with Git, I could create a repo on that partiion, clone it (bare) on a separate drive or system, and periodically commit and push to back up my files.

以这种方式使用Git进行备份有什么弊端?

推荐答案

Git存储库占用的空间与压缩后的每个文件版本一样多.如果您打算将预压缩的数据(如照片)存档,请做好.git增长的准备.

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.

从2011年开始,Git不再使用Subversion之类的二进制差异文件,而是按原样存储二进制文件.

As of 2011 Git does not use binary diffs like, for example, Subversion, and stores binary files as they are, compressed.

如果磁盘空间不足,请考虑使用其他更有效的磁盘空间,即专门的备份解决方案. 博格阁楼 restic zbackup 浮现在脑海.

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备份重要文件-为什么不呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆