3

I have built this CMS that has the option to add entries to the database. Each entry that is created has about 5 to 10 new images showing the product for sale. Each image is about 150Kb in size.

I already know that images should always be stored in Git however my problem is that the sales team users that add new entries in the CMS are obviously working on the production server using the master branch.

Our normal development is development code in your "dev environment" on a branch, then push those changes to the "staging environment" for QA and lastly if all the tests pass, push those changes to "production/live server".

What will be the best way to get those new images that are uploaded on a daily basis into our repository seeing as those images are already on the live server?

2 Answers2

2

It doesn't seem like this is a task for your source control - this is end-user data that needs to be backed up, but otherwise has nothing to do with the product as an entity itself.

For example, if you decided to sell your CMS to another customer, would they expect to see all your products contained in the DB, or would they expect a (mostly) blank database that they would fill with their own product data?

Git is not a backup solution BTW, you need something that can back up your production system and restore it correctly (though any SCM can be used for this task, its not a primary role for it, and you'd still need to backup the SCM repository).

gbjbaanb
  • 48,749
  • 7
  • 106
  • 173
0

I've faced the same problem before. We had to bring live database back into development. It was a manual process and it was carried out on QA lead's request. The more frequently you do this, the better. As the gap (difference) increases, it'll become harder to sync changes.

CodeART
  • 4,060
  • 1
  • 22
  • 23