Migrating uploaded media between Django deployments


#1

My Django deployment, based on OpsCode’s Django Quickstart, uses the
’media’ directory created inside the deployment by the ‘status.rb’ recipe
as the directory to hold user upload files. This is fine, except that I get
a new media directory in the new, ‘current’ deployment whenever I deploy
new code. Ideally, I’d like to copy the contents of the original media
folder over, keeping versioned copies of the media with deployments, say 5
deployments back.

Am I thinking about this the right way? Has anyone else done this? Any
how-to’s out there? I Googled around a bit and couldn’t find anything.
Thanks in advance!


Kevin Harvey
Web Developer
kcharvey@gmail.com


#2

Using the Rails Application cookbook it symlinks system directory from shared/system into current on deploy automatically - perhaps peeking at how this does it will inspire you.

/path/to/deploy/shared/media -> /path/to/deploy/current/media.

-ash

On 23 Nov 2011, at 19:58, Kevin Harvey wrote:

My Django deployment, based on OpsCode’s Django Quickstart, uses the ‘media’ directory created inside the deployment by the ‘status.rb’ recipe as the directory to hold user upload files. This is fine, except that I get a new media directory in the new, ‘current’ deployment whenever I deploy new code. Ideally, I’d like to copy the contents of the original media folder over, keeping versioned copies of the media with deployments, say 5 deployments back.

Am I thinking about this the right way? Has anyone else done this? Any how-to’s out there? I Googled around a bit and couldn’t find anything. Thanks in advance!


Kevin Harvey
Web Developer
kcharvey@gmail.com