title: Backup/Restore SQLite db file to/from location outsides app's storage
body: <p>I've successfully backup my .db file from <code>file:///data/data/my.package.name/databases/data.db</code> into <code>file:///storage/sdcard0/data.db</code> using <code>fileEntry.copyTo()</code>, but have problem on restore db file back to app. </p>
  
  <p>If I copy backup file to <code>file:///android_asset/www/</code> I got FileError error code 1000, and if I copy the file to <code>file:///data/data/my.package.name/databases/</code> directly, there is no error occurred, but my app still reading a empty database after restore done.</p>
  
  <p>My restore db code:</p>
  
  <pre><code>function performDBRestore() {
    window.requestFileSystem(
        LocalFileSystem.PERSISTENT, 0,
        function(fileSystem) {
            window.resolveLocalFileSystemURL(
                "file:///storage/sdcard0/data.db",
                function(fileEntry) {
                    window.resolveLocalFileSystemURI(
                        "file:///data/data/my.package.name/databases/",
                        function(directoryEntry) {
                            fileEntry.copyTo(directoryEntry, "data.db",
                                function (fileEntry) {
                                    console.log("Restore success!");
                                },
                                function (error) { //no error, but db still empty while open
                                    console.log("Restore fail!");
                                }
                            );
                        },
                        function(error) {
                            // if I copy backup file to "file:///android_asset/www/",
                            // I got errCode 1000 here
                        }
                    );
                },
                function (error) {
                    //some error handling....
                }
            );
        },
        function(error) {
            //some error handling....
        }
     );
  }
  </code></pre>
  
  <p>My open db code:</p>
  
  <pre><code>var db = window.sqlitePlugin.openDatabase({name: "data.db"});
  </code></pre>
  
  <p>By the way, if I copy backup file to <code>file:///android_asset/www/</code>, I've to open db like following right?</p>
  
  <pre><code>var db = window.sqlitePlugin.openDatabase({name: "data.db", createFromLocation: 1});
  </code></pre>
  
  <p>Any idea? thanks a lot.</p>