|
From: Thomas G. <to...@ad...> - 2001-12-10 13:14:34
|
On Sun, 9 Dec 2001, Phil Eldridge wrote: > I sat down before to write Linux Bash scripts for backups etc and started= =20 > to wonder: >=20 > a/ Are there any scripts supplied in the sql-ledger release (I haven't=20 > noticed any)? > b/ If not, would it be worth including some in the release? >=20 > What to others do for repeditive type tasks for sql-ledger. Hi Phil, I have tons of scripts that I use for diff things...my project=20 (originally based on Dieter's work but veered off course ;-) is located at www.sqlclinic.net You could have a look in the tarball (just download it and unpack it or use midnight commander to extract only the files you want) to=20 see if there is anything useful. In the install directory there are dump routines like this: #!/bin/sh pg_dump -a test > clinic.dat pg_dump -d test > clinic.all pg_dump -s test > clinic.sql pg_dump test > clinic.df This dumps the data in four diff formats (-a is data only, -d is proper inserts, -s is schema only and no args is everything...see man pg_dump for all options.) There are also fancier routines for database access from the shell. Have a look in /dba/usr_local_clinic for examples of how to do Q&A with a user and then run a query. HTH, Tom -------------------------------------------------------------------- Saint Vincent Catholic Medical Centers =20 -------------------------------------------------------------------- Thomas Good tomg@ { admin | q8 } .nrnet.org Programmer/Analyst Phone: 718-818-5528=20 Behavioral Health Services Fax: 718-818-5056 =20 Residential Services Mobile: 917-282-7359 =20 -------------------------------------------------------------------- /* Rekordmeister ist nur der FC Bayern M=FCnchen! */ -------------------------------------------------------------------- |