Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
pg_dump is a nifty utility designed to output a series of SQL statements that describes the schema and data of your database. You can control what goes into your backup by using additional flags.
Backup: pg_dump -h localhost -p 5432 -U postgres -d mydb > backup.sql
Restore: psql -h localhost -p 5432 -U postgres -d mydb < backup.sql
-h is for host.
-p is for port.
-U is for username.
-d is for database.