Using django cookie cutter can I use the backup command to backup and restore specific tables only?

120 Views Asked by At

The title is the question really. I have one table I need to copy and replace in another database. I'm sure I can just use pg_dump, but wondered if this tool can do it for me.

1

There are 1 best solutions below

0
On

It appears that it doesn't have this facility, however, looking at the code, it is largely a wrapper for pg_dump, so I can solve this by using pg_dump functions.

This line is in the cookie cutter code :

pg_dump | gzip > "${BACKUP_DIR_PATH}/${backup_filename}"