2015-06-17 94 views
1

我想了解更多关于每日或每周的服务器上的完整GIT备份。 我试过@VonCfully 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

这似乎不是一个混帐问题。从你的输出中,它看起来像你的test.sh脚本正试图运行几个不存在的用户脚本。 – Vic

+0

@Vic我已经使用这个链接的备份脚本来运行日常备份https://github.com/VonC/compileEverything/blob/1b01af253eb938efe8f04eb44f9e8af0d9633baa/sbin/save_bundles#L111 – momsfoodfactory

+0

@Vic这与Git有关。 (这是我的git回购保存脚本) – VonC

回答

1

save_bundles脚本(我在 “How do I connect a COPY (an archive, not a clone) of a git repository to its remote?” 和 “Transferring changes made to multiple branches using git-bundle” 提到的)需要一些设置工作。

$ H应设置为一个文件夹:

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

See sources

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

(确保考虑latest version of that script

采购的.bashrcdone in line 8)不是强制性的(这是在我的环境,而不是在你的)

您还需要实用功能get_fqnget_hostname插件$H/sbin/usrcmd

+0

让我试试这个。谢谢。 – momsfoodfactory

+0

假设我的Gitolite服务器位于ubuntu12.04(Primairy服务器),它拥有我所有的裸机远程repo,位于gitadmin user/gitadmin/repositories/每天有200位开发人员将他们的客户端更改为gitolite服务器。所以所有的回购需要从(主服务器ubunut 12.04 192.168.xxx.xxx)备份到(辅助服务器ubunu 14.0 192.168.yyy.yyy)每日cron ..让我帮忙.. – momsfoodfactory

+0

假设我的主服务器宕机或崩溃我的整个源代码将丢失..更安全的一面我想备份我的所有回购协议的辅助服务器和第三个外部硬盘驱动器..如果主要我的任何distaster可以从辅助或第三个外部驱动器恢复它并恢复的数据,以便我的开发活动不会影响和源将是安全的..为了达到这个我已经尝试过你的完整和增量备份..请指教如何可以实现此.. – momsfoodfactory