Link to home
Start Free TrialLog in
Avatar of oo7ml
oo7ml

asked on

Code Backup

Hi,

We use Git to manage all of our code for our client’s projects etc.

I’m looking for a solution that will do the following:

01 - backup Git (just in case)

02 - auto backup databases for each client’s project to the same backup service

Thanks in advance for your help.
Avatar of noci
noci

The backup.... why not a regular backup on tape? (it is in the end just a directory & file structure...)
And to stay with git... a clone that is updated regularly to follow the origin?
I use SCM backup to backup my GitHub and bitbucket repos. It creates the bits to reimport and get repo back, not a working folder
https://scm-backup.org/
Likely you can use SCM Backup as Shaun suggested.

If you require more fine grained control, then you can write your own git backup tool, that...

1) Discovers all branches.

2) Pulls each individual branch into a separate directory.

3) Does a backup on each directory.

4) The for nightly backups, your code will visit all directories + do a git pull, then only do another backup if any files change.

This is typically how I've done this in the past.

You will require enough disk space to maintain all your branches as files.

What tends to occur is only new branches produce backups, as work on old branches goes dark.

For old branches, you can also lock these + delete the files related to that branch from your backup system.

All this is fairly simple + just takes a bit of time to get working + debug.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.