GIT相当于“svnrdump dump --incremental” [英] GIT equivalent to "svnrdump dump --incremental"

查看:178
本文介绍了GIT相当于“svnrdump dump --incremental”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我试图从远程服务器增量备份几个svn和git repos到一个本地服务器,但似乎没有直接的方式来转储远程GIT仓库。



基本上,我使用已存在的或 git clone --mirror 执行 git fetch --all 所有新的回购,然后是 git bundle create --all



还有其他更好的解决方案吗? p>

解决方案

一旦创建了一个完整的包,您可以创建新的增量包

我在这个答案 a 脚本来为我的所有回购提供增量捆绑(除非是完整的捆绑包)。




$ b

创建INCREMENTAL备份 logf} 
echo$ {nowd}为'$ {name}'创建INCREMENTAL备份(以前是$ {_ dd} - $ {_ dt} [$ {s}]>> $ {logfb}
git -C$ {path}包创建$ {bkp} / $ {name} - $ {nowd} - $ {describe} -incr.bundle--since = $ {nbd} .days.ago --all
status = $?

OP 在评论中确认了


我在 git bundle create code> git fetch --all 和/或 git clone --mirror



Is there an equivalent to "svnrdump dump --incremental" in GIT?

I am trying to incrementally backup several svn and git repos from a remote server to a local server but it seems that there is no direct way to "dump" a remote GIT repo.

Basically I perform either "git fetch --all" with already existing or "git clone --mirror" for all new repos followed by "git bundle create --all".

Is there any other/better solution than that?

解决方案

Once a full bundle is created, you can create new incremental bundles.

I have mentioned in this answer a script to make incremental bundles (except once a wekk a full bundle) for all my repos.

echo "Create INCREMENTAL backup for '${name}' (previous was ${_dd}-${_dt}[${s}]" >> "${logf}"
echo "${nowd} Create INCREMENTAL backup for '${name}' (previous was ${_dd}-${_dt}[${s}]" >> "${logfb}"
git -C "${path}" bundle create "${bkp}/${name}-${nowd}-${describe}-incr.bundle" --since=${nbd}.days.ago --all
status=$?

The OP confirms in the comment:

I ended up doing a "git bundle create" after "git fetch --all" and/or "git clone --mirror"

这篇关于GIT相当于“svnrdump dump --incremental”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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