每日和每周的备份策略 [英] Daily and weekly backup strategies

查看:144
本文介绍了每日和每周的备份策略的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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.

错误消息:

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


推荐答案

save_bundles 脚本(我在中提到过我将git存储库的COPY(存档,不是克隆)连接到它的远程?和传输所做的更改

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应该被设置为一个文件夹,其中:

$H should be set to a folder where:


  • 存储库(所有裸露回购站所在的文件夹)是
    backup_xxx(存储该存储箱的文件夹)将高于$ H

查看消息来源

See sources:

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

(请务必考虑该脚本的最新版本)

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

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

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

你还需要实用函数 get_fqn get_hostname ins $ H / sbin / usrcmd

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

这篇关于每日和每周的备份策略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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