How do I move a project from one computer to another?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

How do I move a project from one computer to another?

Tom Tanner
I have a Django project that I want to work on with another computer. Do I need to backup my current project's Postgres database and restore it on the other computer's Postgres database to get my project up and running there? Or is there a Django way to do this?

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b5ab2022-4fd1-4f8f-bb40-d4194bbf397f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How do I move a project from one computer to another?

Etienne Robillard-6

Hi,

you can use rsync for your project's source code.

Etienne


Le 2018-02-12 à 19:09, Tom Tanner a écrit :
I have a Django project that I want to work on with another computer. Do I need to backup my current project's Postgres database and restore it on the other computer's Postgres database to get my project up and running there? Or is there a Django way to do this?
--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b5ab2022-4fd1-4f8f-bb40-d4194bbf397f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
Etienne Robillard
[hidden email]
https://www.isotopesoftware.ca/

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c050701e-c4ac-d9e7-2931-a3d11540f144%40yandex.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How do I move a project from one computer to another?

sum abiut
In reply to this post by Tom Tanner
It depends on where you want to house your app.if you need to house your app on the new machine. Just pip install from your requirements.txt file, then copy your django project to your new machine.

On 13/02/2018 11:10 AM, "Tom Tanner" <[hidden email]> wrote:
I have a Django project that I want to work on with another computer. Do I need to backup my current project's Postgres database and restore it on the other computer's Postgres database to get my project up and running there? Or is there a Django way to do this?

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b5ab2022-4fd1-4f8f-bb40-d4194bbf397f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAPCf-y4zUGDgXEbj62x0mJcHxM1P7r-%3DjX3PgG%2B%3D0C4mb__Jnw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How do I move a project from one computer to another?

Ramez Kabbani
In reply to this post by Tom Tanner
You should  be using some kind of git system. Push your code to the repo and pull it on the new machine. There should be no really concern switching machines.
If your current DB has data that you need, export them and then import.

You need to know how to do this for production code, so you might as well learn now.

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/4ba37cd6-eead-468f-9e90-b2cc42a03c88%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How do I move a project from one computer to another?

Mike Dewhirst-3
In reply to this post by Tom Tanner
On 13/02/2018 11:09 AM, Tom Tanner wrote:
> I have a Django project that I want to work on with another computer.
> Do I need to backup my current project's Postgres database and restore
> it on the other computer's Postgres database to get my project up and
> running there? Or is there a Django way to do this?

There are at least two simple ways to do this. Both need a repo to keep
your source code and requirements file (eg freeze.txt) in sync between
your machines. Both need to run pip -r freeze.txt each time it changes.

1. Dump the "master" database into a text file, copy it to the "slave"
machine and load it there. Obviously you can do this in both directions.
You can use bash scripts or Windows batch files. Risk of human error in
overwriting the wrong database is a constant possibility.

2. Establish your current Postgres as a more widely accessible server
which can be seen from the slave machine. A bonus here is that
migrations can be done from either machine and the database can never
get out of sync. Every database dump is a backup if you include a date
in the filename. And it can be dumped from either machine.

In both cases you will need to manage database credentials using
identical source code in your settings. This is because after you merge
your source from machine to machine in either direction the Django
settings need to see the database. But that's a separate question.

hth

Mike




> --
> 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 [hidden email]
> <mailto:[hidden email]>.
> To post to this group, send email to [hidden email]
> <mailto:[hidden email]>.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/b5ab2022-4fd1-4f8f-bb40-d4194bbf397f%40googlegroups.com 
> <https://groups.google.com/d/msgid/django-users/b5ab2022-4fd1-4f8f-bb40-d4194bbf397f%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3054a69b-214a-c522-7e12-051e35d89e0d%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.