2

我想了解更多关于每天或每周在服务器中完成 GIT 备份的信息。我已经尝试了这个答案中提到的@VonC 完全和增量备份脚本' sbin/save_bundles',它给出了以下错误。

错误信息:

./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
4

1 回答 1

2

save_bundles脚本(我在“如何将 git 存储库的 COPY(存档,而不是克隆)连接到其远程? ”和“使用 git-bundle 传输对多个分支所做的更改”中提到的脚本)需要一些设置才能工作.

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

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

见资料

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

(确保考虑该脚本的最新版本

采购.bashrc在第 8 行完成)不是强制性的(它在我的环境中,但不是在你的环境中)

您还需要实用函数get_fqnget_hostnameins $H/sbin/usrcmd

于 2015-06-17T07:05:58.743 回答