4

I'm just trying to find an easier way to deploy a site I'm working on. I'm working alone with a test a production server and right now deployment means copying a subset of the files and database data onto my computer and uploading it to the prod site. I'm sure there's a simple synchronization tool out there but so far I've had no luck in finding anything.

What I'd really like is an application I can run locally (on windows) or something I could install on my server for let me have a one-click deployment. Any suggestions?

Thanks! godwin

Edit
I have decided for now to go with GoodSync and Toad. Thanks for the suggestions.

Godwin
  • 9,739
  • 6
  • 40
  • 58

7 Answers7

4

man scp

SCP(1) BSD General Commands Manual SCP(1)

NAME scp - secure copy (remote file copy program)

SYNOPSIS scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option] [-P port] [-S program] [[user@]host1:]file1 [...] [[user@]host2:]file2

DESCRIPTION scp copies files between hosts on a network. It uses ssh(1) for data transfer, and uses the same authentication and provides the same security as ssh(1). Unlike rcp(1), scp will ask for passwords or passphrases if they are needed for authentication.

 Any file name may contain a host and user specification to indicate that the file is to be copied to/from that host.  Copies between two
 remote hosts are permitted.

 When copying a source file to a target file which already exists, scp will replace the contents of the target file (keeping the inode).

 If the target file does not yet exist, an empty file with the target file name is created, then filled with the source file contents.  No
 attempt is made at "near-atomic" transfer using temporary files.

 The options are as follows:

 -1      Forces scp to use protocol 1.

 -2      Forces scp to use protocol 2.

...

miki
  • 695
  • 3
  • 8
  • I don't think I currently have SSH access but I think I'll look into this more at a later time. – Godwin Oct 05 '11 at 04:26
2

I use GoodSync http://www.goodsync.com/ for this sort of thing. It's really good. Runs on windows, can sync between any combination of local files (S)FTP, windows, linux network shares etc.

Then create a scheduled task/cronjob to run an export of the database into the syncronised folder and have one do an import at the other end. Obviously this process is one way.

Ben Swinburne
  • 25,669
  • 10
  • 69
  • 108
  • Yeah, this is the kind of thing that I'm looking for. I'll have to also find a database synchronizer but that takes a back seat to just updating php, js, and css files anyway. – Godwin Oct 05 '11 at 04:28
2

http://www.phing.info/docs/guide/stable/

PHing is an automated build system made for PHP. Works with GIT, SVN, PHPUnit, etc...

You basically set up XML files that give PHing instructions on what to do. Allows you to run test suites along with build creation, build multiple varied versions at a time, copy files as well as db, and a bunch of other cool features.

Also, it's open source and platform independent.

dqhendricks
  • 19,030
  • 11
  • 50
  • 83
1

We use an FTP Synchronizer, which seems to work pretty well. I don't know offhand of any good free ones.

Example: http://www.ftpsynchronizer.com/

mellamokb
  • 56,094
  • 12
  • 110
  • 136
1

What are you using for source control? Some tools like Git and SVN have ready-made methods for this sort of thing. See here for a quick Git solution.

Community
  • 1
  • 1
Rob Allen
  • 17,381
  • 5
  • 52
  • 70
  • Nothing, I don't really feel that I need it at the moment since I'm the only one working on it. – Godwin Oct 05 '11 at 04:15
  • Source control isn't just for multiperson projects. That's like walking a tightrope without a net because its only your life on the line. See here for reasons: http://stackoverflow.com/questions/132520/good-excuses-not-to-use-version-control – Rob Allen Oct 05 '11 at 13:11
  • Except my life is not on the line, I'm mostly working with css files so it's more like walking a tightrope that lying on the ground without a safety net. I'm in the process of putting it on github now that I have more time and another developer. – Godwin Oct 07 '11 at 02:28
1

I would second the advice about Git/SVN, but would put in a strong plug for Git via GitHub. Use GitHub as your "central" Git repository. Your local Git repository will push to GitHub, and your production server will pull from GitHub.

There is some overhead to learning Git/GitHub, but really, in the situation you've described (a single engineer and two servers), Git isn't any more complicated then SVN (or CVS or anything else).

madomausu
  • 321
  • 2
  • 3
  • I have thought about adding a document repository but I feel like that's a bit much right now since it's only me working on it. Thanks though. – Godwin Oct 05 '11 at 04:31
0

Depends on what type of server you are running, but you could run SVN (Subversion). There is a plugin for Eclipse, Aptana, and Zend Studio if you use that to develop.

Essentially you could have a development repository that sits on the server. You would pull your code down to your local environment and commit it back after changes. Then you can setup another repository that is your live data or production thats linked back to your Development repository.

When you want to update the live data, you just update it so if any trouble happens you can roll back that code without having to roll back your development code. Once you get good at all that you can start branching and tagging your projects.

I personally use both SVN and Git, but I prefer Git because it works so much better. Though if you are using Windows, the command line tools just aren't the same as linux.

Cosmin
  • 21,216
  • 5
  • 45
  • 60
lumberjacked
  • 966
  • 1
  • 21
  • 35