N
N
NewTypes2014-07-18 12:57:43
git
NewTypes, 2014-07-18 12:57:43

How do you set up backups for your code?

The question may be banal, but I would like to see how professional developers do it. Learn from experience so to speak.
While developing software and having a bad experience with screw failure and wiring problems, I bought stabilizers and a backup power supply, a new screw bit in and I'm still ready to copy to a portable one. To put it mildly, for what I'm working on, I'm ready to kill and the slightest delay / rollback to the old version is not acceptable for me. I mastered git and now I'm thinking how to set up copying to a bunch of baskets as efficiently as possible.
I have never been friends with backup, and especially with versioned. In my thoughts, do incremental backups during operations with git and according to the schedule once every half an hour (both git and code).
What do you think?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
M
mrstrictly, 2014-07-18
@mrstrictly

Backing up from a local machine to a local machine, even when it comes to external drives, raids, and so on, seems like a dead idea to me. A virus, an accidental reboot right at the moment of copying, anything else, and you are left with a broken backup. A backup frequency of once every half an hour, and even during the working day, is a sure way to get a broken repository image, and indeed redundant.
I see two sensible options. Their general idea is the same: set up a remote repository and push into it at least once a day.
1. If the code is not very secret, get yourself a repository on github or any other code hosting.
2. If the code is secret, buy yourself the simplest server. It can even be a single board computer, network storage or a router that allows firmware for some kind of DD-WRT, and install your git repository on this server using, for example, gitolite: https://github.com/sitaramc/gitolite
In both the first and second options, if you are very concerned about safety, then once a day, for example, at night, you can make a full (not incremental) backup copy of the code to a long-term storage device. And do not forget to periodically (once a month or six months) arrange "exercises" for yourself and rehearse recovery. Sometimes there are surprises. :)

O
OnYourLips, 2014-07-18
@OnYourLips

Backup code is something incomprehensible and unnecessary.
Use remote git. Of the free - Bitbucket.

R
rdev, 2014-07-18
@rdev

Recently set up SVN backup.
Did so.
Once every 2 hours, the cron runs a script that collects backups of all repositories, generates archives and sends everything to an additional server.
As a result, the additional server has backups of all repositories that, if necessary, can be used to restore SVN

Z
zxmd, 2014-07-18
@zxmd

Upload to gdrive and dropbox.
You can still, as you did in the old days - write to a blank, but honestly I can’t imagine what you are working on there that you don’t have enough local backups + git.

Z
zooks, 2014-07-18
@zooks

And I think it’s not necessary to back up so often, just push to GitHub more often.
Use an SSD as a carrier, even if minimal delays are critical.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question