X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=doc%2FMAINTENANCE.postgresql;h=0cc7df07b717aaf305a591e7336e5bca97e0709f;hb=32a9f823dc39ea68d09005071f43e570a1ca81b7;hp=df5cae54b42d7825660f804f71a9086aa6c11b2d;hpb=14056d8a61e9e0d01d0de17cff2d9e548cc8e3ed;p=mir.git diff --git a/doc/MAINTENANCE.postgresql b/doc/MAINTENANCE.postgresql index df5cae54..0cc7df07 100755 --- a/doc/MAINTENANCE.postgresql +++ b/doc/MAINTENANCE.postgresql @@ -1,21 +1,26 @@ -To dump mir database : - pg_dumplo -a -d -s /dumpdir/dir - pg_dump -c -D -f /dumpdir/.sql -this generates a dir with all blobs and a sql-file with all data. -To restore the database: - psql < .sql - pgdump_lo -i -d -s /dumpdir/dir +DUMP & RESTORE -Every once in a while (or make a script) postgresql database should -be "cleaned". See postgresql docs for commands VACUUM and VACUUM ANALYZE +To dump the database use pg_dump + + pg_dump -Ft -b -u -f dump.tar [name_of_database] + +To restore do the following + + pg_restore -d [name_of_database] -U [dbuser] -Ft dump.tar + + +VACUUM and VACUUM ANALYZE Every once in a while (or make a script) postgresql database should be "cleaned". See postgresql docs for commands VACUUM and VACUUM ANALYZE +MISC + We also have misc. perl scripts to merge Large Objects from other DB's. these can be used as a basis to write your own custom scripts. + USER MANAGMENT IN POSTGRESQL -- set owner of datbase