Daily and weekly backup strategies

孤街醉人 提交于 2019-12-06 13:09:16

问题


I would like to understand more about Complete GIT backup in Server on everyday or weekly basis. I have tried the @VonC fully and incremental backup script 'sbin/save_bundles', mentioned in this answer, which gives the following error.

Error message:

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


The save_bundles script (that I mentioned in "How do I connect a COPY (an archive, not a clone) of a git repository to its remote?" and "Transferring changes made to multiple branches using git-bundle") requires some settings to work.

$H should be set to a folder where:

  • repositories (the folder where all your bare repos reside) is
  • backup_xxx (the folder where the bundles are stored) will be above $H

See sources:

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

(make sure to consider the latest version of that script)

Sourcing the .bashrc (done in line 8) is not mandatory (it is in my environment, but not in yours)

You would also need the utility functions get_fqn and get_hostname ins $H/sbin/usrcmd.



来源:https://stackoverflow.com/questions/30882853/daily-and-weekly-backup-strategies

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!