nothing is impossible!!!!

nothing is impossible!!!!

Monday, August 24, 2009

Postgresql backup and restore.

First method using pg_dump and second one is file system level backup.

Dump level Backup:
pg_dump dbname > outfile

Options available with pg_dump,
-h hostname. Default is localhost or whatever is set in PGHOST variable.
-p which port. PGPORT env.
-U username. default is logged in user name. PGUSER env.
outfile - name of the target file

pg_dump does not block other operations on the database while it is working. (Exceptions are those operations that need to operate with an exclusive lock, such as VACUUM FULL.)

psql dbname < infile
infile - infile is what you used as outfile for the pg_dump command.

It is suggested to run analyze on each db to obtain the useful statistics. Run,
vacuumdb -a -z to VACUUM ANALYZE all databases;

pg_dump and psql can also use to dump a database directly from one server to another;
for example:
pg_dump -h host1 dbname | psql -h host2 dbname

2. File system level backup
tar -cf backup.tar /usr/local/pgsql/data
- Servers must be shutdown before taking backup.
- To restore database, we have to restore full database, can not do partial restore of tables or etc.


diana wright said...

I would say that a PMP Certification is highly respected within both IT & non-IT communities where strong project management skills are required. If you plan on a long term career as a project manager, then yes, even with your level of experience, I would suggest getting your PMP. You can prepare yourself for the exam in one of the PMP trainingproviders like You can do minimal prep-work to get 40 PMI® Contact Hours and apply to PMI for PMP Exam before the class begins.

elizabeth thomas said...

It will definitely ease your work of handling a big project. As a project manager I use scrum in my projects. One of my friends referred me to use the Guide to Scrum Body of Knowledge by I like the concepts of sprints, daily standup meetings, etc. the SBOK Helped me alot in Understanding how Agile Project Management works.