2012-12-10 78 views
4

我找不到任何地方如何使用「--exclude」。 當我嘗試這個代碼「heroku db:pull --exclude table_name」如何排除多個表?

heroku help db:pull 

我得到這個:

Usage: heroku db:pull [DATABASE_URL] 

pull heroku data down into your local database 

DATABASE_URL should reference your local database. if not specified, it 
will be guessed from config/database.yml 

-c, --chunksize SIZE # specify the number of rows to send in each batch 
-d, --debug   # enable debugging output 
-e, --exclude TABLES # exclude the specified tables from the pull 
-f, --filter REGEX # only pull certain tables 
-r, --resume FILE # resume transfer described by a .dat file 
-t, --tables TABLES # only pull the specified tables 

好,我知道如何使用「-e」有一個表,但是我想排除多個表。 它不工作:

heroku db:pull -e users, versions 
+0

如果我不得不做出基於常用的命令行約定我說'-e「用戶版本」'一個猜測,但是這只是一個有幾種可能性。不過,如果出於某種原因,您確實需要報價。 –

回答

7

它爲我

heroku db:pull -e "stats admins" --app APP_NAME 
+0

看起來這不再被支持? – dataflow

0

我只是用

heroku pg:pull DATABASE_URL LOCAL_DB --exclude-table-data TABLE_NAME --app APP_NAME

UPDATE:要排除多個表嘗試

heroku pg:pull DATABASE_URL LOCAL_DB --exclude-table-data TABLE_1_NAME; --exclude-table-data TABLE_2_NAME --app APP_NAME

嘗試Heroku的PG:拉--help得到完整的文檔

相關問題