1

I have method to backup my work on localhost based on week basis. I use multipe dos command and save in on a bat file. I use command such as copy and xcopy and save my localhost to another place.

After my server grow larger, I think it take too much space. So tehre is a way to solve this problem? Maybe a software that can track changes on our php code or another method to preserve your code when thing go bad?


EDIT: I use Windows XP sp2, on XAMPP Apache PHP 5. 2. 1

The localhost refer to my laptop. I install the localhost server here.

4
  • 1
    Can you specify what kind of server(s) you are talking about? Remotely hosted production servers? Local development servers? What OS's?
    – Pekka
    Mar 25, 2010 at 16:25
  • it's more as local development server (i think)
    – justjoe
    Mar 25, 2010 at 16:28
  • This isn't programming related despite adding the tag "Programmer", this should be asked on either ServerFault or SuperUser.
    – Lazarus
    Mar 25, 2010 at 16:29
  • @Pekka: Isn't "bat file" specific to Windows?
    – Dor
    Mar 25, 2010 at 16:29

3 Answers 3

4

a software that can track changes on our php code or another method to preserve your code when thing go bad ?

You just described version control. You really should be using something like SVN, Mercurial, or GIT, all of which are free. Used correctly, version control gives you the following abilities:

  • Roll your code back to a specific point in time
  • Track changes of how code came to be the way it is
  • A back up in case something happens to your working copy
  • A way to coordinate work among multiple developers.
  • A easy way to write 'test' code in your current project without actually committing that code to the project, and still track it

Not all of those apply to you, but give it a chance and you'll soon wonder how you ever did without others. Version control is easily capable of handling your php site.

Once you've mastered version control, you should also move on to other modern development practices like unit testing and continuous integration.

1

You should install some free VCS and craft some scheduled script that backup weekly for you or use some incremental sync tools like Rsync (if you are on Windows you need Cygwin)

0

I use a backup script synchronizes to a backup directory (the backup directory can be on a network share or on the local machine) and then creates a tarball and deploys it to the backup location. The backup directory is optionally created on the fly by extracting the last deployed tarball. This allows me to delete the backup directory as space dictates, and gives me the option of optimizing for disk space or execution time.

Are you using version control? Although strictly speaking version control is NOT a backup solution, it does function as a loss prevention device.

1
  • i don't use version control. I assume it more about backup your code so when i got virus and have to reinstall OS, i still have my backup. (i have experience his situation)
    – justjoe
    Mar 25, 2010 at 16:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .