restore

pg_restore error: role XXX does not exist

别来无恙 提交于 2019-12-04 08:48:23
问题 Trying to replicate a database from one system to another. The versions involved are 9.5.0 (source) and 9.5.2 (target). Source db name is foodb with owner pgdba and target db name will be named foodb_dev with owner pgdev . All commands are run on the target system that will host the replica. The pg_dump command is: pg_dump -f schema_backup.dump --no-owner -Fc -U pgdba -h $PROD_DB_HOSTNAME -p $PROD_DB_PORT -d foodb -s --clean; This runs without errors. The corresponding pg_restore is: pg

SQL Server Restore Error - Access is Denied

心已入冬 提交于 2019-12-04 07:27:16
问题 I created a database on my local machine and then did a backup called tables.bak of table DataLabTables . I moved that backup to a remote machine without that table and tried to do a restore but get the following error: System.Data.SqlClient.SqlError: The operating system returned the error '5(Access is denied.)' while attempting 'RestoreContainer::ValidateTargetForCreation' on 'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DataLabTables.mdf'. How do I fix my rights, if that is the

Windows Azure Active Directory Backup/Restore [closed]

梦想的初衷 提交于 2019-12-04 05:29:52
Closed. This question is off-topic. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 months ago . I am looking for a way to backup/restore Windows Azure Active Directory to protect against user error. I recognize the robust nature of Azure and am not concerned with infrastructure failure and the like. What I am concerned with is protection from a fat finger mistake caused by a member of the DevOps team. For example: an authorized member of the DevOps team is assigned the task of deleting an

How to save and restore the state of an ExpandableListView in Android?

£可爱£侵袭症+ 提交于 2019-12-03 21:40:13
问题 Is it possible to save and restore the state (which items are collapsed and which not) of an ExpandableListView in Android? If it is possible, how can I do that? Can I access the ExpandableListView in onPause() / onResume() and how? 回答1: I iterate through the groups and save the state of them all: int numberOfGroups = MyExpandableListViewAdapter.getGroupCount(); boolean[] groupExpandedArray = new boolean[numberOfGroups]; for (int i=0;i<numberOfGroups;i++) groupExpandedArray[i] =

How to reliably restore MySQL blobs

自作多情 提交于 2019-12-03 17:15:30
问题 I have been backing up a MySQL database for several years with the command: mysqldump myDatabaseName -u root > myBackupFile.sql The backups have appeared to work fine... I then wanted to restore one of the backups to a different named database so I did: mysql myNewDatabaseName -u root < myBackupFile.sql I got some errors about logfile size so I stopped Mysql and removed the logfiles and set the following parameters in the my.ini file and restarted mysql. innodb_log_file_size=64M innodb_log

onRestore not invoked for my custom BackupAgent

别等时光非礼了梦想. 提交于 2019-12-03 16:16:45
问题 There are some data in my Android app that I would like to backup and restore. For that purpose I have created a custom implementation of BackupAgent . In my manifest in have included the backup agent as you can see below <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto" package="com.myapp" android:versionCode="14" android:versionName="1.13" > <application android:backupAgent="com.myapp.MyBackupAgent"> <meta-data android:name="com.google

How to backup and restore the Mongodb database

偶尔善良 提交于 2019-12-03 16:14:12
How to use C# to backup and restore the Mongodb database? For now there is only an server to save the mongodb data, and I want to make an backup in case of the server is destroyed so that I can restore it. Dose anybody know how to do that using C#? Prahlad Yeri If you just want automated backups, there is an easier way than resorting to a full-fledged programming language: http://docs.mongodb.org/manual/tutorial/backup-databases-with-filesystem-snapshots/ As shown in the link, the below command would suffice. You may put it in a statup-script/daemon to execute it at regular frequencies: Backup

SQL Server backup&restore

孤街醉人 提交于 2019-12-03 15:25:45
backup string connectionString1 = (@"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|Database1.mdf;Database=Database1;Integrated Security=True; User Instance=True"); SqlConnection cn = new SqlConnection(connectionString1); cn.Open(); SqlCommand cmd = new SqlCommand(); SqlDataReader reader; cmd.CommandText = @"BACKUP DATABASE Database1 TO DISK = 'C:\SRI2Works.bak'"; cmd.CommandType = CommandType.Text; cmd.Connection = cn; reader = cmd.ExecuteReader(); cn.Close(); MessageBox.Show("Database Backup Successfull."); restore string connectionString1 = (@"Data Source=.\SQLEXPRESS

SKPaymentTransactionStateRestored doesn't get called when In App purchase is being restored

青春壹個敷衍的年華 提交于 2019-12-03 12:46:16
In my In App purchase the case SKPaymentTransactionStateRestored: method does not get called when the purchase is restored, instead, case SKPaymentTransactionStatePurchased: is being called, but would like to show the user different information, when the purchase is restored. [queue restoreCompletedTransactions] will trigger SKPaymentTransactionStateRestored state, where queue is SKPaymentQueue. You should not expect this to be called after your user confirms transactions. Instead user would be warned by the device if he had already purchased the product. I've a clue. The method (paymentqueue