1
我正在使用django-dbbackup創建我的備份postgres db。當我運行python manage.py dbbackup
時,它會創建一個default.backup
文件。Django db備份postgres錯誤
但是,當我運行python manage.py dbrestore
時出現以下錯誤。
Restoring backup for database: hera
Finding latest backup
Restoring: /home/dev/Documents/Program Codes/Python/Django/Hera/default.backup
Restore tempfile created: 670.5 KB
Are you sure you want to continue? [Y/n]y
Running: dropdb --username=****** --host=localhost hera
dropdb: database removal failed: ERROR: must be owner of database hera
CommandError: Error running: [u'dropdb', u'--username=dev', u'--host=localhost', u'hera']
似乎有一個明確的信息:'dropdb:數據庫刪除失敗:錯誤:必須是數據庫hera'的擁有者 –
但是,如何以擁有者的身份運行它? –