Tuesday, June 17, 2008

Fairfax County Gifted School

Copy or make a backup in postgresql database

After a long time without updating the blog, I return to do a little trick to managing a database in postgresql.

To copy the data and schema from a postgresql database we can use the following command:
 
pg_dump-c mydbname> ARCHIVO.sql


If you later want to enter this data into the database we can use this command: cat
 
ARCHIVO.sql then you re-use. Basically
recursively parse all files. Rb. RBW and. Subdirectory c today seeking comment on the definition of each function and at the beginning of the file. With all this data creates HTML files in a subdirectory called "doc." An example of the result is: api.rubyonrails.com

To run you must call: rdoc

Some useful flags are:


- main [PATH to a file], the file will be targeted The startup appears as the generated documentation.
- all, includes private methods in the documentation (by default only includes the public).

    - op [PATH to a directory], use this directory to save the documentation instead of "doc."

  • - inline-source, the source code of each method in the documentation.

  • marking
  • Basic rules:

  • = Level 1 Heading

== Level 2 Heading

    * or - create a list item

  • # create a numbered list item

  • With the words you can do: _italica_, * bold * and + code +

  • More information:

  • rdoc.sourceforge.net



0 comments:

Post a Comment