Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] Help with external export scripts for databases



******    message to minivend-users from Mike Heins <mikeh@minivend.com>     ******

Quoting Ed LaFrance (edl@newmediaems.com):
> 
> I am working on some Perl scripts for exporting gdbm and db databases for 
> an older, busy minivend site (3.14), the idea being that these could be run 
> externally from command line, crontab, etc 'offline' from the site.  This 
> is pretty straightforward, but the wrinkle is that the site(s) are using 
> Storable, and when I try to use any storable functions in the script i get:
> 
> Storable binary image v56.97 more recent than I am (v1.0) at 
> blib/lib/Storable.pm (autosplit into blib/lib/auto/Storable/thaw.al) line 
> 238, at export_db line 17
> 
> ...which seems odd, since minivend is running fine and without errors.  I 
> am admittedly a perl hack - in this case I was just trying to "thaw" the 
> value element form the database when I got this error, and maybe I caused 
> the problem  Here is a code snippet:
> 

I have always exported by placing in a page:

[if session arg eq password]
Export
    [loop arg="products pricing transactions etc etc"]
	[loop-code]=[tag export [loop-code] /tmp/[loop-code].tab TAB][/tag]
    [/loop]
[else]
Need the password sent as argument.
[/else]
[/if]

Then you just run a cron job that calls:

	GET http://localhost/cgi-bin/catalog/pagename?;password

Much easier than writing a script, so much so that I never bothered
to write one. 8-)

-- 
Akopia, Inc., 131 Willow Lane, Floor 2, Oxford, OH  45056
phone +1.513.523.7621 fax 7501 <heins@akopia.com>

Being against torture ought to be sort of a bipartisan thing.
-- Karl Lehenbauer
-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: