Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

Postgresql dump SS archive script (See related posts)

Dump, bzip, and upload a postgres database to strongspace. Via Ubernostrum

#!/usr/bin/bash

FILENAME=b_list-`/usr/xpg4/bin/date +%Y%m%d`.sql.bz2
cd /home/myuser/dumps
/opt/local/bin/pg_dump -U db_username db_name | /usr/bin/bzip2 > $FILENAME
/usr/bin/scp $FILENAME me@strongspace:/my/backup/dir/

You need to create an account or log in to post comments to this site.


Related Posts