Android backup/restore: how to backup an internal database?

After revisiting my question, I was able to get it to work after looking at how ConnectBot does it. Thanks Kenny and Jeffrey! It’s actually as easy as adding: FileBackupHelper hosts = new FileBackupHelper(this, “../databases/” + HostDatabase.DB_NAME); addHelper(HostDatabase.DB_NAME, hosts); to your BackupAgentHelper. The point I was missing was the fact that you’d have to use … Read more

How to save/restore Sublime Text 2 configs/plugins to migrate to another computer?

I just set up a good solution for this, it requires dropbox. I am currently using this to sync plugins and settings across ~5 different sublime installs on windows, linux, osx, and a few vm’s. Step 1: use PackageControl to manage all your plugins, its awesome. Step 2: Add a “Sublime” directory to your root … Read more

PostgreSQL: improving pg_dump, pg_restore performance

First check that you are getting reasonable IO performance from your disk setup. Then check that you PostgreSQL installation is appropriately tuned. In particular shared_buffers should be set correctly, maintenance_work_mem should be increased during the restore, full_page_writes should be off during the restore, wal_buffers should be increased to 16MB during the restore, checkpoint_segments should be … Read more

When exactly are onSaveInstanceState() and onRestoreInstanceState() called?

Per the documentation: void onRestoreInstanceState (Bundle savedInstanceState) This method is called between onStart() and onPostCreate(Bundle). void onSaveInstanceState (Bundle outState) If called, this method will occur after onStop() for applications targeting platforms starting with Build.VERSION_CODES.P. For applications targeting earlier platform versions this method will occur before onStop() and there are no guarantees about whether it will … Read more

“No backupset selected to be restored” SQL Server 2012

I had this problem and it turned out I was trying to restore to the wrong version of SQL. If you want more information on what’s going on, try restoring the database using the following SQL: RESTORE DATABASE <YourDatabase> FROM DISK='<the path to your backup file>\<YourDatabase>.bak’ That should give you the error message that you … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)