[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

How do we update files in production server while maintaining an old file to roll-back to?

Posted on 2012-04-06
10
Medium Priority
?
229 Views
Last Modified: 2012-04-16
Currently we are updating our live web server files by renaming the current server file to be like index.php-ddmmyy and then uploading the latest file.

We want to keep the old file in case bugs happened and we can easily roll-back to the old file.

Is this a good practice? If not, please suggest a better one.
0
Comment
Question by:melwong
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
  • +2
10 Comments
 
LVL 7

Expert Comment

by:designatedinitializer
ID: 37818025
A better strategy would be to have your development server under version-control, and have a deployment script upload your development files whenever you want to release them to the public.
0
 

Author Comment

by:melwong
ID: 37818040
How do i put my dev server under version control? SVN in dev web server?
0
 
LVL 21

Expert Comment

by:motnahp00
ID: 37818069
How about implementing VSS so you don't have to worry about renaming your file? You can just revert back to a point in time.
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 7

Expert Comment

by:designatedinitializer
ID: 37818080
How do i put my dev server under version control? SVN in dev web server?

Yes, version control your dev web server.
I'm using git myself.
0
 
LVL 14
ID: 37819179
From an administrative perspective we create ZIP archives of the entire WWW root with it's version number, then deploy the new code into the site.

Similar Idea, pretty easy to maintain, but SVN is also a valid method, of course then you may have additional services on your web server which isn't the best if you can avoid it.

-Q
0
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 37819209
Many of my colleagues use GIT and PHP has recently moved to GIT.  See the notes here:
http://www.php.net/archive/2012.php#id2012-03-20-1
0
 
LVL 7

Expert Comment

by:designatedinitializer
ID: 37819401
QCubed:

My advice is to have version control on your local server, NEVER on the production server.
Then you just write a deployment script that you run each time you want to release your last version from the local server to the production server.
0
 
LVL 14

Accepted Solution

by:
Ben Personick (Previously QCubed) earned 150 total points
ID: 37821294
yeah, I wasn't sure if you wanted it one way or the other.

As I said it's a similar concept, since I write a script to zip the old sit up, date it, and then copy the new files into place.

What I've found is that we end up making quick tweaks to code on the fly to fix minor problems and that it is not necessarily anything which needs to be captured in SVN, connection strings and server names are often different, etc, or a slight typo made it through QA, and you have to change in prod before you do anything.

Not sure if all that would have to be managed through the SVN or still by hand in your method, but I think the result is essentially the same.

-Ben
0
 
LVL 7

Expert Comment

by:designatedinitializer
ID: 37821734
well... I guess it all depends on your need for history and accountability of the changes to the codebase.
You might want every change logged, or not.
I'm partial to having everything logged, so as to stick it in the face of those few individuals who sometimes try my patience...
0
 

Author Closing Comment

by:melwong
ID: 37854059
thx
0

Featured Post

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
Ready to get certified? Check out some courses that help you prepare for third-party exams.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question