Search code examples
gitversion-controlamazon-elastic-beanstalkbeanstalk-svn

Beanstalk: How to sync files generated on the server back to the beanstalk repository?


I am using beanstalk to develop my files locally and deploy them to the production server via beanstalk.

But what about the changes made on the website through the cms or any other changes that are made by the user (images, text, etc) so that I always have 1:1 copy?

How do I sync changes made on the on production server back to my beanstalk repository?


Solution

  • Easy:

    Get a backup of your live files and apply them to your local git repo. Maybe commit them to a special branch (incoming-live) that you can merge in when you need/want to.

    Hard:

    You could set up your deployment server as a git repo.

    Then, deployments could be done using pushes directly to the server and reset to the latest version using hooks.

    New files could be automatically added and committed (more hooks) and pushed back to origin. Then, you would have access to the live changes as they happen, all in git.