Live data from Hacker News

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

news.ycombinator.com

41–49 of 49 posts

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

#41
post #27

Man - I'm low class apparently as I'm apparently the only one who uses Filezilla or just a plain FTP client. I support about 30 domains and this route helps me. I do have some internally-written apps that will upload files to a lot of different domains at once.

You should at least be using SFTP, since FTP isn't encrypted.

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

#42
post #31
post #5

Earlier quoted context omitted.

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.

You can also set your webserver to ignore the .svn folders.

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

#43
post #31
post #5

Earlier quoted context omitted.

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.

... but export can waste a lot of time and bandwidth if your project is large ;-)

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

#44
post #4

i use mercurial, assuming your base directory is /www/pages (lighttpd), initially: server: $ mkdir /www/pages/project $ cd /www/pages/project $ hg init localhost: $ cd /path/to/your/project $ hg init $ hg add * $ hg commit -m "message" $ hg push ssh://usr:pwd@123.123.123.123//www/pages/project afterward it's just the localhost (ignore "$ hg init")

Here's the bash script I use with Mercurial to deploy:

hg qpop -a ; hg pull ; hg update $1 ; hg qpush -a

The $1 is a branch or tag argument given to the Bash script. That way you can easily specify a particular version to update to (or rollback to!) on the command line.

The qpop and qpush will rebase any MQ patches you've made, e.g. local configuration changes, hacks, etc.

More on rebasing applied patches with Mercurial: http://hgbook.red-bean.com/hgbookch12.html#x16-28900012.8

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

#46
post #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

rsync is usually configured to use ssh by default. no need for -e.

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

#48
post #46
post #33

Earlier quoted context omitted.

You should really use ssh with that. Not much more complex: rsync -azP local_dir -e ssh user@host.com:remote_dir

rsync is usually configured to use ssh by default. no need for -e.

Never knew that, but you're right!
Post reply on HN