Skip to content

Instantly share code, notes, and snippets.

@kourindouhime
Created December 25, 2014 23:17
Show Gist options
  • Save kourindouhime/b9d419c776892c0325e8 to your computer and use it in GitHub Desktop.
Save kourindouhime/b9d419c776892c0325e8 to your computer and use it in GitHub Desktop.
pg_dump databases in list
while read line; do sudo -u postgres /usr/bin/pg_dump $line > /media/storage00/pgdump/$line-$(date +%d-%m-%Y).sql; done < /var/lib/postgresql/backup-list.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment