我使用此命令备份200GB数据库(postgres 9.1,win7 x64):
pg_dump -Z 1 db_name > backup
它创建了16GB的文件,我觉得很好,因为以前的备份工作(并且由ext工具打包)具有相似的大小.现在,当我尝试使用pg_restore恢复到PG9.2时,我收到错误:
input file does not appear to be a valid archive
使用pg_restore -Ft:
[tar archiver] corrupt tar header found in ▼ (expected 13500752,com puted 78268) file position 512
Gzip也表明它已经损坏了.当我在Total Commander中打开备份文件时,内部文件只有1.8GB.
当我在寻找解决方案时,可能应该使用-Cf参数进行转储.
现在哪种格式的文件?它只是tar或gzip(winrar显示gzip)?
有没有办法正确地恢复它或者它以某种方式被破坏(转储时没有错误)?可能是由于tar或gzip的文件大小限制?