1

i am new to git. i read a few links on how to create a git repo and maintain a back up there but couldn't get any concrete material. what i have to do is that i have a server written in php which stores the files uploaded by the users. i want to create an hourly backup of the files on the git. can anyone tell me how to go about it? my server is on php and my client side is on android. i am using windows. i was also told that using linux would be better.. please give me more input on that. thanks in advance.

rockernerd
  • 31
  • 4
  • 1
    Also, please try to limit the scope of your questions. You're probably not going to get much input on the Windows-vs-Linux question, because (a) both are fine and appropriate solutions to certain problems and (b) that's mostly a matter of opinion, so it can't really be answered. – larsks May 06 '12 at 00:30

2 Answers2

1

Because every clone of a repository is also a fully qualified repository, every clone of a repository is also a full backup. This means, if you want to create a dedicated backup, just clone it somewhere on a separate machine.

KingCrunch
  • 128,817
  • 21
  • 151
  • 173
1

You can also keep a backup by creating a bundle of a Git repo.
I like this method because a bundle is only one file, which is:

  • easier to copy around (especially on a Dropbox remote disk)
  • less prone to data corruption or copy error (which can happen when you clone or copy a Git repo around, with all its numerous files)
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250