Live data from Hacker News

Ask YC: How do you upload to your web server?

news.ycombinator.com

31–40 of 49 posts

Re: Ask YC: How do you upload to your web server?

#31
post #5

Earlier quoted context omitted.

Yes. I am using SVN to collaborate with my friends. How do you copy easily?

Commit your changes on your local machine then SSH to your server and do an svn update.

one problem with this method, is that your web directory will have all of the .svn folders sprinkled throughout your subfolders. svn export avoids this issue.

Re: Ask YC: How do you upload to your web server?

#32
A separate SVN checkout (with Tortoise), then WinSCP. Surprisingly, you can use WinSCP very well with scripting. Could also make a backup in the same script but didn't yet. The same setup for getting down the database from the production to the development machines.

It's not very professional, but for our needs it's perfect.

Re: Ask YC: How do you upload to your web server?

#33
post #29

For my personal site, I use rsync, and I keep the command in a makefile so I don't have to remember it (I also use the makefile to generate the static pages from templates). It looks like this: sync: rsync -az --progress ./ user@host:public_html/ .PHONY: sync But for anything significant, I use a VCS, currently svn or git.

You should really use ssh with that. Not much more complex:

rsync -azP local_dir -e ssh user@host.com:remote_dir

Re: Ask YC: How do you upload to your web server?

#35

Git or SVN using Capistrano. If you're deploying code, you really should be using Capistrano. Even if it is not a Rails project. It is a world of difference.

I found Capistrano a little too Rails-centric. I've had a lot of luck with a Python equivalent, Fabric. It works well with the Boto Amazon AWS library to manage EC2 instances. Capistrano has limited AWS support but it seemed immature at the time I tested it.

http://pypi.python.org/pypi/Fabric/

http://code.google.com/p/boto/

Re: Ask YC: How do you upload to your web server?

#36
I use Fabric - http://pypi.python.org/pypi/Fabric/ - with a series of build scripts. I can create and update several different types of EC2 servers (database, app, etc) with a single commands.

The update command does something like this:

* Check out all pertinent application files from the repository.

* Add any production specific files, for example build number or database setups

* Combine, compress, and number all Javascript and CSS files (combined.384.css can be cached forever, on update it becomes combined.385.css)

* Tar and gzip the production files

* Find all EC2 servers that need to be updated

* Upload the gzipped files

* Stop apache

* Remove old files on the server(s)

* Unzip the new files

* Start apache

Re: Ask YC: How do you upload to your web server?

#39
post #23

After I'm done editing my pages, I save them to a 5.25" floppy and mail it via USPS to GoDaddy in Arizona with the instructions to place on my webserver.

Seriously man, it's 2008. Time to move to 3.5" floppies already.

Dude. He was being ironic.
Post reply on HN