(self, cmd)
restore ?DB? FILE: Restore database from FILE into DB (default "main")

        Copies the contents of FILE to the current database (default "main").
        The backup is done at the page level - SQLite copies the pages as
        is.  There is no round trip through SQL code.
restore ?DB? FILE: Restore database from FILE into DB (default "main")
restore ?DB? FILE : Restore database from FILE into DB ( default main )
def command_restore(self, cmd):
        """restore ?DB? FILE: Restore database from FILE into DB (default "main")

        Copies the contents of FILE to the current database (default "main").
        The backup is done at the page level - SQLite copies the pages as
        is.  There is no round trip through SQL code.
        """
        dbname = "main"
        if len(cmd) == 1:
            fname = cmd[0]
        elif len(cmd) == 2:
            dbname = cmd[0]
            fname = cmd[1]
        else:
            raise self.Error("Restore takes one or two parameters")
        input = apsw.Connection(fname)
        b = self.db.backup(dbname, input, "main")
        try:
            while not b.done:
                b.step()
        finally:
            b.finish()
            input.close()
def command_restore ( self , cmd ) : dbname = "main" if len ( cmd ) == 1 : fname = cmd [ 0 ] elif len ( cmd ) == 2 : dbname = cmd [ 0 ] fname = cmd [ 1 ] else : raise self . Error ( "Restore takes one or two parameters" ) input = apsw . Connection ( fname ) b = self . db . backup ( dbname , input , "main" ) try : while not b . done : b . step ( ) finally : b . finish ( ) input . close ( )