Edmhs
Edmhs

Reputation: 3731

Subversion checkout in shared hosting?

I know that shared hostings don't allow svn installation.

I got question about whats the best way to copy website from repository to shared hosting.

Now:

My repository is on other VPS.

I do checkout to my computer and then copy all to shared hosting.

how i can copy data from repo to hosting with one step?

Upvotes: 2

Views: 1073

Answers (4)

brokenbeatnik
brokenbeatnik

Reputation: 730

Take a look for Subversion hosts with a remote deployment solution. My company, Projectlocker is one, but others such as Beanstalk do have some solutions in this space as well. The hosts that do support this allow you either topress a button to deploy your code from the host to the remote server via a protocol such as SCP or SFTP or to deploy on every commit automatically if you prefer.

Upvotes: 0

nonot1
nonot1

Reputation: 2818

If you have SSH access to the target webserver, give rsync and scp a look:

http://en.wikipedia.org/wiki/Rsync

http://en.wikipedia.org/wiki/Secure_copy

I would not advise installing Subversion server (either svnserve or via apache) on a production web server. Nor would I advise just copying, or checking out, a working copy on to the web server. Too many security issues.

Basically, what you want to do is generate a local copy of the site in your staging area, and then rsync (or scp) it to the production server.

You can do this manually, or better yet, make a small "deploy site" shell script that will:

  1. svn export the version/tag you want to deploy in to a clean local folder.
  2. rsync this folder to the production server.

Hope this helps... Good luck! :)

Upvotes: 2

Andrew
Andrew

Reputation: 14447

If I'm understanding your situation correctly, you want to check out or update from a Subversion repository on one machine to your hosting account on GoDaddy, and you have ssh access to GoDaddy. If you cannot or do not wish to have a Subversion client on your shared hosting account to use from the ssh command-line, you could try using sshfs from some other machine. Then, you can treat your GoDaddy web space as just another directory, and you can check out or update your repository accordingly.

Upvotes: 2

Dave Bacher
Dave Bacher

Reputation: 15972

On your computer (assuming you've got a linux / OS X command line):

svn export <your repository> my-export
tar -cf - -C my-export . | ssh user@godaddy-host 'tar -C my-web-app-dir -xf -'

First you export what you want to copy to your web host. svn export is better than a direct checkout because it won't copy over the .svn directories (a potential security hole).

Next, you use tar to bundle up the export directory and pipe it through an ssh session to untar it on the other side.

Upvotes: 0

Related Questions