Re: Moving a Django website to another server

2013-01-31 Thread Avraham Serour
Just checked the docs, looks like ImageField stores the path

it was a satchmo app, does someone knows what it does with the product
images?

thanks
avraham


On Thu, Jan 31, 2013 at 4:45 PM, Kelly Nicholes wrote:

> If you're storing your images in your database (don't) then your db
> migration should have done it.  If you're storing the paths in the
> database, let's hope they're relative paths to the images.  You'll have to
> copy the images to your new server using the same approaches listed above.
>  One alternative is to have a separate server that serves all of your
> static media, then your paths can stay the same, regardless of which
> server(s) your database(s)/code is on.
>
>
> On Thursday, January 31, 2013 5:47:45 AM UTC-7, אברהם סרור wrote:
>
>> similar question on the same topic:
>>
>> I used dumpdata/loaddata to move from sqlite to postgres, while it was
>> able to move the relations it didn't get any image, any way I could
>> something similar but including the images?
>>
>> would south be able to do it?
>>
>>
>> On Thu, Jan 31, 2013 at 11:09 AM, John Robertson 
>> wrote:
>>
>>> Hi there, thanks for all your very helpful responses. Its all a little
>>> out of my comfort zone so I might employ someone to do it for me. Any
>>> takers/quotes?
>>>
>>> cheers
>>> John
>>>
>>>
>>> On Friday, January 25, 2013 10:20:49 AM UTC, John Robertson wrote:

 Hi there, if I want to move a Django website to another host, is it as
 simple as copying across all the site files and DB (and changing config
 files)? If so, is there some kind of tool to create a zipped folder of the
 website so that FTP does not take several hours! Sorry if this seems a very
 basic question, but I just wanted to check before I proceed with it. They
 are fairly simple, small sites, but still there are thousands of files.

 Many thanks!
 John

>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users...@**googlegroups.com.
>>> To post to this group, send email to django...@googlegroups.com.
>>> Visit this group at 
>>> http://groups.google.com/**group/django-users?hl=en
>>> .
>>> For more options, visit 
>>> https://groups.google.com/**groups/opt_out
>>> .
>>>
>>>
>>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Moving a Django website to another server

2013-01-31 Thread Mike Doroshenko II

I have scripts that use rsync for my backups, this is old hat for me lol :)

John Robertson wrote:
Hi there, thanks for all your very helpful responses. Its all a little 
out of my comfort zone so I might employ someone to do it for me. Any 
takers/quotes?


cheers
John

On Friday, January 25, 2013 10:20:49 AM UTC, John Robertson wrote:

Hi there, if I want to move a Django website to another host, is
it as simple as copying across all the site files and DB (and
changing config files)? If so, is there some kind of tool to
create a zipped folder of the website so that FTP does not take
several hours! Sorry if this seems a very basic question, but I
just wanted to check before I proceed with it. They are fairly
simple, small sites, but still there are thousands of files.

Many thanks!
John

--
You received this message because you are subscribed to the Google 
Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to django-users+unsubscr...@googlegroups.com.

To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


--
Mike Doroshenko, Junior Sys Admin
TecKnoQuest Inc.
mi...@tecknoquest.com
www.tecknoquest.com

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Moving a Django website to another server

2013-01-31 Thread Kelly Nicholes
If you're storing your images in your database (don't) then your db 
migration should have done it.  If you're storing the paths in the 
database, let's hope they're relative paths to the images.  You'll have to 
copy the images to your new server using the same approaches listed above. 
 One alternative is to have a separate server that serves all of your 
static media, then your paths can stay the same, regardless of which 
server(s) your database(s)/code is on.

On Thursday, January 31, 2013 5:47:45 AM UTC-7, אברהם סרור wrote:
>
> similar question on the same topic:
>
> I used dumpdata/loaddata to move from sqlite to postgres, while it was 
> able to move the relations it didn't get any image, any way I could 
> something similar but including the images?
>
> would south be able to do it?
>
>
> On Thu, Jan 31, 2013 at 11:09 AM, John Robertson 
> 
> > wrote:
>
>> Hi there, thanks for all your very helpful responses. Its all a little 
>> out of my comfort zone so I might employ someone to do it for me. Any 
>> takers/quotes?
>>
>> cheers
>> John
>>
>>
>> On Friday, January 25, 2013 10:20:49 AM UTC, John Robertson wrote:
>>>
>>> Hi there, if I want to move a Django website to another host, is it as 
>>> simple as copying across all the site files and DB (and changing config 
>>> files)? If so, is there some kind of tool to create a zipped folder of the 
>>> website so that FTP does not take several hours! Sorry if this seems a very 
>>> basic question, but I just wanted to check before I proceed with it. They 
>>> are fairly simple, small sites, but still there are thousands of files.
>>>
>>> Many thanks!
>>> John
>>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-users...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com
>> .
>> Visit this group at http://groups.google.com/group/django-users?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Moving a Django website to another server

2013-01-31 Thread Avraham Serour
similar question on the same topic:

I used dumpdata/loaddata to move from sqlite to postgres, while it was able
to move the relations it didn't get any image, any way I could something
similar but including the images?

would south be able to do it?


On Thu, Jan 31, 2013 at 11:09 AM, John Robertson <
linksstreetdes...@gmail.com> wrote:

> Hi there, thanks for all your very helpful responses. Its all a little out
> of my comfort zone so I might employ someone to do it for me. Any
> takers/quotes?
>
> cheers
> John
>
>
> On Friday, January 25, 2013 10:20:49 AM UTC, John Robertson wrote:
>>
>> Hi there, if I want to move a Django website to another host, is it as
>> simple as copying across all the site files and DB (and changing config
>> files)? If so, is there some kind of tool to create a zipped folder of the
>> website so that FTP does not take several hours! Sorry if this seems a very
>> basic question, but I just wanted to check before I proceed with it. They
>> are fairly simple, small sites, but still there are thousands of files.
>>
>> Many thanks!
>> John
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Moving a Django website to another server

2013-01-31 Thread John Robertson
Hi there, thanks for all your very helpful responses. Its all a little out 
of my comfort zone so I might employ someone to do it for me. Any 
takers/quotes?

cheers
John

On Friday, January 25, 2013 10:20:49 AM UTC, John Robertson wrote:
>
> Hi there, if I want to move a Django website to another host, is it as 
> simple as copying across all the site files and DB (and changing config 
> files)? If so, is there some kind of tool to create a zipped folder of the 
> website so that FTP does not take several hours! Sorry if this seems a very 
> basic question, but I just wanted to check before I proceed with it. They 
> are fairly simple, small sites, but still there are thousands of files.
>
> Many thanks!
> John
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Moving a Django website to another server

2013-01-26 Thread Sanjay Bhangar
On Sat, Jan 26, 2013 at 7:09 AM, Addy Yeow  wrote:
> I was looking for a consistent and error-free deployment as I switch
> between servers frequently despite using the same public domain. rsync
> was great but I had to manually reload server thereafter or issue a
> syncdb, etc.
>
> I have since moved to Fabric for my deployment needs. See
> http://docs.fabfile.org/en/1.5/tutorial.html.
> With Fabric, I only need to issue one command for daily deployment to
> existing or new server, e.g. fab deploy, under my Django project
> directory to deploy the project.
>

Just to second this - there are several articles on the interwebs
about using fabric, virtualenv and pip for managing your dependencies
and deployments. I have found this to be an incredibly smooth way to
manage things. The only sometimes nasty thing about moving stuff from
one server to another is installing all the dependencies you need for
your django project to run - 3rd party apps, python packages you need,
etc. One situation that can occur frequently is that if you install a
dependency on the new server, it gets a later version of the package,
and this breaks something on your code which depends on some behaviour
of an older version. To tackle this, I've found 'pip freeze' to be
great - you type 'pip freeze' in the virtualenv of your working
project code, and it lists all the python packages the project is
using with their exact versions, so you can use this to create a
requirements.txt file to 'pip install -r requirements.txt' from on the
new server while making sure it gets the very exact version of
dependencies so you can be sure it is running the same code -- in
general, I have found this to be the smoothest way to deploy projects
onto new servers.

hth,
Sanjay

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Moving a Django website to another server

2013-01-25 Thread Addy Yeow
I was looking for a consistent and error-free deployment as I switch
between servers frequently despite using the same public domain. rsync
was great but I had to manually reload server thereafter or issue a
syncdb, etc.

I have since moved to Fabric for my deployment needs. See
http://docs.fabfile.org/en/1.5/tutorial.html.
With Fabric, I only need to issue one command for daily deployment to
existing or new server, e.g. fab deploy, under my Django project
directory to deploy the project.

On Sat, Jan 26, 2013 at 9:04 AM, Adrián Espinosa
 wrote:
> If both hosts are Linux, you can use "rsync -avuzr source destination".
> Option -z enables compression
>
> On Friday, January 25, 2013 11:20:49 AM UTC+1, John Robertson wrote:
>>
>> Hi there, if I want to move a Django website to another host, is it as
>> simple as copying across all the site files and DB (and changing config
>> files)? If so, is there some kind of tool to create a zipped folder of the
>> website so that FTP does not take several hours! Sorry if this seems a very
>> basic question, but I just wanted to check before I proceed with it. They
>> are fairly simple, small sites, but still there are thousands of files.
>>
>> Many thanks!
>> John
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Moving a Django website to another server

2013-01-25 Thread Adrián Espinosa
If both hosts are Linux, you can use "rsync -avuzr source destination". 
Option -z enables compression 

On Friday, January 25, 2013 11:20:49 AM UTC+1, John Robertson wrote:
>
> Hi there, if I want to move a Django website to another host, is it as 
> simple as copying across all the site files and DB (and changing config 
> files)? If so, is there some kind of tool to create a zipped folder of the 
> website so that FTP does not take several hours! Sorry if this seems a very 
> basic question, but I just wanted to check before I proceed with it. They 
> are fairly simple, small sites, but still there are thousands of files.
>
> Many thanks!
> John
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Moving a Django website to another server

2013-01-25 Thread Oscar Carballal
Bill has a point, I assumed both were VPSs that had the same services,
software and directory structures. If you change that, then it will be
a bit more of work :)

2013/1/25 Bill Freeman :
> What kind of hosts?  if both are linux, then tar is your friend, using the
> -z or -j options
> to create compressed archives, though zip and unzip commands are likely
> available
> too.  If you use ftp (faster, but less secure than scp/sftp), be sure to
> transfer in binary
> mode (text is the default, and will cause problems for bytes in the
> compressed file
> that look like carriage return or line feed).
>
> Whether it is just a matter of copying "everything" depends on how
> compatible the
> two machines are.  For example, if you are using the system's base python,
> rather
> than installing one of your own, and the two are different versions, they
> .pyc files
> will not be compatible.  Also, if you installed django and other apps
> naively, they
> may be in directories that you aren't copying.  It is also possible that
> there are
> dependencies (libraries linked against by the egg installers) that are
> missing
> or incompatible on the new box.  There are also presumably http server and
> database servers that need to be installed, and which have configuration
> files.
> So, unless you're cloning the whole OS install onto a compatible piece of
> hardware
> (and even there you should do things like fix up the network configuration
> and
> ssh machine keys) I think that you're going to have trouble "just copy"ing.
>
> Bill
>
> On Fri, Jan 25, 2013 at 10:22 AM, Oscar Carballal  wrote:
>>
>> For our project e-cidadania it was like that, we only had to make a
>> clone of the git repository and we made a symbolic link to the config
>> files (so we can pull the code without affecting the config). After
>> that we made an import into the new database, fix the config files et
>> voilá.
>>
>> You can try SSH if you have it available, via the "scp" command, it's
>> faster and easier in my opinion, but if you only have the FTP
>> available you should take care of the file permissions and user/group.
>>
>> Regards,
>> Oscar Carballal
>>
>> 2013/1/25 John Robertson :
>> > Hi there, if I want to move a Django website to another host, is it as
>> > simple as copying across all the site files and DB (and changing config
>> > files)? If so, is there some kind of tool to create a zipped folder of
>> > the
>> > website so that FTP does not take several hours! Sorry if this seems a
>> > very
>> > basic question, but I just wanted to check before I proceed with it.
>> > They
>> > are fairly simple, small sites, but still there are thousands of files.
>> >
>> > Many thanks!
>> > John
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "Django users" group.
>> > To post to this group, send email to django-users@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > django-users+unsubscr...@googlegroups.com.
>> > Visit this group at http://groups.google.com/group/django-users?hl=en.
>> > For more options, visit https://groups.google.com/groups/opt_out.
>> >
>> >
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>>
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Moving a Django website to another server

2013-01-25 Thread Bill Freeman
What kind of hosts?  if both are linux, then tar is your friend, using the
-z or -j options
to create compressed archives, though zip and unzip commands are likely
available
too.  If you use ftp (faster, but less secure than scp/sftp), be sure to
transfer in binary
mode (text is the default, and will cause problems for bytes in the
compressed file
that look like carriage return or line feed).

Whether it is just a matter of copying "everything" depends on how
compatible the
two machines are.  For example, if you are using the system's base python,
rather
than installing one of your own, and the two are different versions, they
.pyc files
will not be compatible.  Also, if you installed django and other apps
naively, they
may be in directories that you aren't copying.  It is also possible that
there are
dependencies (libraries linked against by the egg installers) that are
missing
or incompatible on the new box.  There are also presumably http server and
database servers that need to be installed, and which have configuration
files.
So, unless you're cloning the whole OS install onto a compatible piece of
hardware
(and even there you should do things like fix up the network configuration
and
ssh machine keys) I think that you're going to have trouble "just copy"ing.

Bill

On Fri, Jan 25, 2013 at 10:22 AM, Oscar Carballal  wrote:

> For our project e-cidadania it was like that, we only had to make a
> clone of the git repository and we made a symbolic link to the config
> files (so we can pull the code without affecting the config). After
> that we made an import into the new database, fix the config files et
> voilá.
>
> You can try SSH if you have it available, via the "scp" command, it's
> faster and easier in my opinion, but if you only have the FTP
> available you should take care of the file permissions and user/group.
>
> Regards,
> Oscar Carballal
>
> 2013/1/25 John Robertson :
> > Hi there, if I want to move a Django website to another host, is it as
> > simple as copying across all the site files and DB (and changing config
> > files)? If so, is there some kind of tool to create a zipped folder of
> the
> > website so that FTP does not take several hours! Sorry if this seems a
> very
> > basic question, but I just wanted to check before I proceed with it. They
> > are fairly simple, small sites, but still there are thousands of files.
> >
> > Many thanks!
> > John
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To post to this group, send email to django-users@googlegroups.com.
> > To unsubscribe from this group, send email to
> > django-users+unsubscr...@googlegroups.com.
> > Visit this group at http://groups.google.com/group/django-users?hl=en.
> > For more options, visit https://groups.google.com/groups/opt_out.
> >
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Moving a Django website to another server

2013-01-25 Thread Oscar Carballal
For our project e-cidadania it was like that, we only had to make a
clone of the git repository and we made a symbolic link to the config
files (so we can pull the code without affecting the config). After
that we made an import into the new database, fix the config files et
voilá.

You can try SSH if you have it available, via the "scp" command, it's
faster and easier in my opinion, but if you only have the FTP
available you should take care of the file permissions and user/group.

Regards,
Oscar Carballal

2013/1/25 John Robertson :
> Hi there, if I want to move a Django website to another host, is it as
> simple as copying across all the site files and DB (and changing config
> files)? If so, is there some kind of tool to create a zipped folder of the
> website so that FTP does not take several hours! Sorry if this seems a very
> basic question, but I just wanted to check before I proceed with it. They
> are fairly simple, small sites, but still there are thousands of files.
>
> Many thanks!
> John
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Moving a Django website to another server

2013-01-25 Thread John Robertson
Hi there, if I want to move a Django website to another host, is it as 
simple as copying across all the site files and DB (and changing config 
files)? If so, is there some kind of tool to create a zipped folder of the 
website so that FTP does not take several hours! Sorry if this seems a very 
basic question, but I just wanted to check before I proceed with it. They 
are fairly simple, small sites, but still there are thousands of files.

Many thanks!
John

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.