每日和每周备份策略

时间:2015-06-17 05:19:38

标签: git backup backup-strategies

我想更多地了解每天或每周在服务器中完成GIT备份。 我尝试了@VonC fully and incremental backup script 'sbin/save_bundles',提到in this answer,这会产生以下错误。

错误讯息:

./test.sh : line 7 : /home/.bashr : No such file or directory
./test.sh : line 69 : /home/sbin/usrcmd/get_hostname : No such file or directory
./test.sh : line 70 : get_hostname : command not found
./test.sh : line 71 : /home/sbin/usrcmd/get_fqn : No such file or directory
./test.sh : line 72 : get_fqn : command not found

1 个答案:

答案 0 :(得分:1)

save_bundles脚本(我在&#34; How do I connect a COPY (an archive, not a clone) of a git repository to its remote?&#34;&#34; Transferring changes made to multiple branches using git-bundle&#34;中提及)需要一些设置才能正常工作。< / p>

$ H应设置为以下文件夹:

  • 存储库(所有裸存储库所在的文件夹)
  • backup_xxx(存储捆绑包的文件夹)将高于$ H

See sources

repos="${H}/repositories"
bkp="${H}/../backups"

(请务必考虑latest version of that script

采购.bashrcdone in line 8)不是强制性的(它在我的环境中,但不在您的环境中)

您还需要实用程序函数get_fqnget_hostname ins $H/sbin/usrcmd