Hey folks,
If you added or dropped columns, please DO NOT use this method. cstore data file would still contain data for old columns, it could reject the data file when you try to open after restoring.
Again, this method is safe only if you haven't changed anything on table columns.
proved (little bit longer) way is to pg_dump/copy from old instance, pg_restore/copy in to new instance.
while old instance was running
1- pg_dump -d postgres -t your_cstore_table > your_cstore_table.ddl
2- psql -d postgres -c "copy your_cstore_table to stdout with csv" > your_cstore_table.data
3- copy ddl and data files to new server/instance
4- psql -d postgres -f your_cstore_table.ddl
5- psql -d postgres -c "\copy your_cstore_table from your_cstore_table.data with csv"
if you use pg_upgrade you could skip steps 1 and 4.
1. psql -d postgres -c "copy your_cstore_table to stdout with csv" > your_cstore_table.data
2. run pg_upgrade to upgrade the instance
3. psql -d postgres -c "\copy your_cstore_table from your_cstore_table.data with csv"
please let me know if you need any assistance with this.
Murat