The database have following several tables.
There are 29547 rows in DeviceData table.
I used following code to backup the database.
using( PgSqlConnection conn = new PgSqlConnection( ConnectionStringBuilder.ConnectionString ) )
{
conn.Open();
PgSqlDump pgSqlDump = new PgSqlDump();
pgSqlDump.Connection = conn;
pgSqlDump.IncludeDrop = true;
pgSqlDump.Mode = DumpMode.All;
pgSqlDump.Backup( @"C:\backup.bak");
}
The process succeeded, and the backup file size is 67.4Mb
After that I create an empty database, and used following code to restore
using( PgSqlConnection conn = new PgSqlConnection( ConnectionStringBuilder.ConnectionString ) )
{
conn.Open();
PgSqlDump pgSqlDump = new PgSqlDump();
pgSqlDump.Connection = conn;
pgSqlDump.Mode = DumpMode.All;
pgSqlDump.Restore( @"C:\backup.bak" );
}
The restore process succeeded, but there are only 2563 rows in the DeviceData Table.
Any ideas? Thanks.
Records are missing from backup or restore
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
Please specify the version of dotConnect for PostgreSQL you are using. I've tried backing up a database of similar size with the latest 5.0.58 version, and couldn't reproduce the issue.
If possible, please send us ( support * devart * com ) a backup (please create it with a standard tool like PgAdmin) of the database with which the problem can be reproduced. In this case, please also notify us here.
If possible, please send us ( support * devart * com ) a backup (please create it with a standard tool like PgAdmin) of the database with which the problem can be reproduced. In this case, please also notify us here.