backup/restore DB data...

218 views
Skip to first unread message

Jens Diemer

unread,
Mar 16, 2007, 10:33:09 AM3/16/07
to django...@googlegroups.com

I would like to backup and restore my django App-Database. This should
be usable with a Web-GUI.
I thought fixtures would be well usable for it. But there are some
problems with this. Look at:
http://groups.google.com/group/django-users/browse_thread/thread/6a4e9781d08ae815

What is a good/other way, for DB backups?


--
Mfg.

Jens Diemer


----
A django powered CMS: http://www.pylucid.org

limodou

unread,
Mar 16, 2007, 10:49:24 AM3/16/07
to django...@googlegroups.com
On 3/16/07, Jens Diemer <python...@jensdiemer.de> wrote:
>
>
> I would like to backup and restore my django App-Database. This should
> be usable with a Web-GUI.
> I thought fixtures would be well usable for it. But there are some
> problems with this. Look at:
> http://groups.google.com/group/django-users/browse_thread/thread/6a4e9781d08ae815
>
> What is a good/other way, for DB backups?
>
You can try db_dump.py tool, it's not a web-gui based, but a command line tool.

http://www.djangosnippets.org/snippets/14/

--
I like python!
UliPad <<The Python Editor>>: http://wiki.woodpecker.org.cn/moin/UliPad
My Blog: http://www.donews.net/limodou

Jens Diemer

unread,
Mar 16, 2007, 11:58:13 AM3/16/07
to django...@googlegroups.com
limodou schrieb:

> You can try db_dump.py tool, it's not a web-gui based, but a command line tool.
>
> http://www.djangosnippets.org/snippets/14/

Very cool! It seems to work without problems ;)

I made a hack to put it into my web install section:
http://pylucid.net/trac/changeset/930

But i must redirect the stdout and make a fake optparse options...

Is it possible you change the script, so its easy to use it without a shell?


And a feature request: a option to zip all dumpfiles and load the dump
on-the-fly from a zip archive. So a user can download one zipfile as a
backup ;)


btw. can you insert a Licence statements into you script?

Michael

unread,
Mar 16, 2007, 4:41:23 PM3/16/07
to django...@googlegroups.com


On 3/17/07, limodou <lim...@gmail.com > wrote:

On 3/16/07, Jens Diemer <python...@jensdiemer.de> wrote:
>
>
> I would like to backup and restore my django App-Database. This should
> be usable with a Web-GUI.
> I thought fixtures would be well usable for it. But there are some
> problems with this. Look at:
> http://groups.google.com/group/django-users/browse_thread/thread/6a4e9781d08ae815
>
> What is a good/other way, for DB backups?
>
You can try db_dump.py tool, it's not a web-gui based, but a command line tool.

http://www.djangosnippets.org/snippets/14/

It is a very good tool to work with Mysql or sqlite3 but not with Postgresql.



--
--
Michael

limodou

unread,
Mar 16, 2007, 8:26:01 PM3/16/07
to django...@googlegroups.com
I haven't worked with Postgresql ever, or if you like you can help me
with it. Or if I have time, I need to learn about Postgresql.

limodou

unread,
Mar 16, 2007, 8:29:32 PM3/16/07
to django...@googlegroups.com
On 3/16/07, Jens Diemer <python...@jensdiemer.de> wrote:
>
> limodou schrieb:
> > You can try db_dump.py tool, it's not a web-gui based, but a command line tool.
> >
> > http://www.djangosnippets.org/snippets/14/
>
> Very cool! It seems to work without problems ;)
>
> I made a hack to put it into my web install section:
> http://pylucid.net/trac/changeset/930
>
> But i must redirect the stdout and make a fake optparse options...
>
> Is it possible you change the script, so its easy to use it without a shell?
>

So you want just run it as a module? And what output do you want? Just
output to stdout?

>
> And a feature request: a option to zip all dumpfiles and load the dump
> on-the-fly from a zip archive. So a user can download one zipfile as a
> backup ;)
>

It's a good idea. I'll think about it.

>
> btw. can you insert a Licence statements into you script?

Ok, I'll add a BSD License.

Russell Keith-Magee

unread,
Mar 16, 2007, 9:33:43 PM3/16/07
to django...@googlegroups.com
On 3/17/07, Michael <michael....@gmail.com> wrote:
>
> > You can try db_dump.py tool, it's not a web-gui based, but a command line
> tool.
> >
> > http://www.djangosnippets.org/snippets/14/
> >
>
> It is a very good tool to work with Mysql or sqlite3 but not with
> Postgresql.

An alternative is to use the database dumping capability that is built
into Django (./manage.py dumpdata) - this works fine with Postgres and
SQLite; MySQL will have some problems, depending on which backend you
are using.

Yours,
Russ Magee %-)

Reply all
Reply to author
Forward
0 new messages