Re: [Sycamore-Dev] mirroring a wiki for development

2008-12-23 Thread Philip Neustrom
Excerpts from Paul Ivanov's message of Tue Dec 23 16:24:34 -0800 2008:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Philip wrote:
  There is export.py which will produce an XML dump, but I figured a
 pg_dump is probably good?
 
 I decided against threadjacking the map overhaul conversation, but I've
 been meaning to ask about this:
 
 1. Has anyone tried to make a corresponding import.py to go from XML
 back to a DB?
 
 2. what are your strategies for mirroring a live wiki when doing
 development?
 
 I run off a patched up sqlite branch locally when I play around doing
 bugfixes, but I wanted to backup my wiki in its entirety and couldn't
 think of a good way to do this (images borked in the db dump, though
 that was probably some encoding issue). Anyone have a good way of
 mirroring everything on another machine?
 
 thanks,
 Paul
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.6 (GNU/Linux)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
 iD8DBQFJUYFCe+cmRQ8+KPcRAmsdAJ40FQ+TWWb4ksthOrg6FTBLT5AffACdGHZt
 bWelYM2m2bvbOhhwP3AzdEc=
 =iBwo
 -END PGP SIGNATURE-

There's no import.py as of yet, as far as I know.  Making it wouldn't be 
difficult, but I'm not sure it'd have much utility now: database dump / import 
is generally the way to go and the export.py stuff 
(http://www.projectsycamore.org/Export) was thrown together for folks on Wiki 
Spot who wanted dumps of their wikis (e.g. might need to only be the globally 
visable pages).

I use pg_dump for postgres with --format=c

sudo -u postgres pg_dump --format=c wikispot 
--file=/srv/sql/postgresql/wikispot.db.out

is the command I usually do.  The format=c means you'll need to use pg_restore 
to import the dump, but it's compressed.

The images shouldn't be borked on a dump - definitely sounds like an encoding 
issue.

If you're using sqlite it's insanely simple: just copy the single database file 
(woo sqlite).  share/data/wiki.db is the file.

--philip


signature.asc
Description: PGP signature
___
Sycamore-Dev mailing list
sycamore-...@wikispot.org
http://www.projectsycamore.org/
https://tools.cernio.com/mailman/listinfo/sycamore-dev


Re: [Sycamore-Dev] mirroring a wiki for development

2008-12-23 Thread Paul Ivanov
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



Philip Neustrom, on 2008-12-23 16:41, wrote:
 Excerpts from Paul Ivanov's message of Tue Dec 23 16:24:34 -0800 2008:
 Philip wrote:
 There is export.py which will produce an XML dump, but I figured a
 pg_dump is probably good?
 
 I decided against threadjacking the map overhaul conversation, but I've
 been meaning to ask about this:
 
 1. Has anyone tried to make a corresponding import.py to go from XML
 back to a DB?
 
 2. what are your strategies for mirroring a live wiki when doing
 development?
 
 I run off a patched up sqlite branch locally when I play around doing
 bugfixes, but I wanted to backup my wiki in its entirety and couldn't
 think of a good way to do this (images borked in the db dump, though
 that was probably some encoding issue). Anyone have a good way of
 mirroring everything on another machine?
 
 thanks,
 Paul

 There's no import.py as of yet, as far as I know.  Making it wouldn't be 
 difficult, but I'm not sure it'd have much utility now: database dump / 
 import is generally the way to go and the export.py stuff 
 (http://www.projectsycamore.org/Export) was thrown together for folks on Wiki 
 Spot who wanted dumps of their wikis (e.g. might need to only be the globally 
 visable pages).

 I use pg_dump for postgres with --format=c

 sudo -u postgres pg_dump --format=c wikispot 
 --file=/srv/sql/postgresql/wikispot.db.out

 is the command I usually do.  The format=c means you'll need to use 
 pg_restore to import the dump, but it's compressed.

 The images shouldn't be borked on a dump - definitely sounds like an encoding 
 issue.
 If you're using sqlite it's insanely simple: just copy the single database 
 file (woo sqlite).  share/data/wiki.db is the file.

 --philip

I got excited when I first spotted export.py, because surely, there's
an import.py somewhere. I thought I could run sqlite locally to do
development, and transfer all of the data from mysql/pg using export.py
and the would-be import.py.

Up to now, I've been running off sqlite to do development but on a
default (empty) wiki. I wanted to test if I could replicate my
production wiki which runs off mysql, so I set up mysql locally,
imported the the dump, recreated the views, and got stuck when i got
this trace in browser.


Traceback (most recent call last):
  File /home/pi/syc/Sycamore/request.py, line 747, in run
Page(query, self).send_page(count_hit=1)
  File /home/pi/syc/Sycamore/Page.py, line 832, in send_page
polite_msg=polite_msg)
  File /home/pi/syc/Sycamore/wikiutil.py, line 1614, in send_title
request.write(request.theme.header(d))
  File /home/pi/syc/Sycamore/theme/eggheadbeta.py, line 679, in header
'banner_html': self.banner(d),
  File /home/pi/syc/Sycamore/theme/eggheadbeta.py, line 68, in banner
wikiutil.init_logo_sizes(self.request)
  File /home/pi/syc/Sycamore/wikiutil.py, line 408, in init_logo_sizes
logo = Image.open(logo_file)
  File /usr/lib/python2.5/site-packages/PIL/Image.py, line 1917, in open
raise IOError(cannot identify image file)
IOError: cannot identify image file


Anyway, I'll play around with the encoding, and update the wiki
instructions if I figure something out.

Paul
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJUedLe+cmRQ8+KPcRAkHuAJ9WIRdPEk7jsA2q9WaSchR28o397wCgj0HV
VmSbQPLZQvmo9OzJMGLxUw4=
=Bkp/
-END PGP SIGNATURE-
___
Sycamore-Dev mailing list
sycamore-...@wikispot.org
http://www.projectsycamore.org/
https://tools.cernio.com/mailman/listinfo/sycamore-dev