Daily and weekly backup strategies

985 views Asked by At

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

There are 1 answers

5
VonC On

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.