The error message is as follows (I am translating it to English because it is in Spanish):
--------------------------------------------------------------------------
ERROR: duplicate key violates uniqueness restriction >.
DETAIL: The key already exists (applicationname)=(/).
********** Error **********
ERROR: duplicate key violates uniqueness restriction >.
SQL state: 23505
DETAIL: The key already exists (applicationname)=(/).
--------------------------------------------------------------------------
I have checked the "aspnet_roles" table and I do not see that the "applicationname" field has to do with a key of any kind. I do not even find a key with a name of "aspnet_roles_applicationname_key" in the dumped file. I have sent the file that contains the backup in case you need it. I am using pgAdmin III SQL Editor to restore the DB. My PostgreSQL version is 9.0.1. What I notice is that the error message refers to (applicationname)=(/) and such an application is running in a production web server; on the other hand, I want to perform the restore task in my development PC so, the applicationname is different. Nevertheless, if I get a compressed backup using pgAdmin III, I can successfully restore it to my PC using pgAdmin III too.
This is the VB code:
Code: Select all
Protected Sub Respaldo(ByVal strNombre As String, ByVal strConnString As String)
Dim strConn As String = ConfigurationManager.ConnectionStrings(strConnString).ConnectionString
Dim pgConn As New PgSqlConnection(strConn)
pgConn.Unicode = True
pgConn.Open()
Dim pgDump As PgSqlDump = New PgSqlDump
pgDump.Connection = pgConn
pgDump.Schema = "restaurant"
pgDump.IncludeDrop = True
pgDump.Backup(txtUbicacion.Text + strNombre + ".backup")
pgConn.Close()
End Sub
Jorge Maldonado