I want to setup a gitlab server on my local server and also use gitlab cloud as an offsite backup. Whenever a developer pushes their work i want it to go to both gitlab servers. I will do this using the following git commands
git remote set-url --add --push origin git://my_local_repo_url
git remote set-url --add --push origin git://my_gitlab_com_repo_url
I am concerned though that the two servers could go out of sync easily.
- What would happen if one of the servers was down during the push so one succeeded and one failed? How would i handle this?
- What if a developer forgot to add one of the remote URLs so only one of the servers was being pushed to and then the second remote URLs was added. What would happen the next push and how would i handle it?
- What other problems might I run into?