storm-apt/api/src/main/java/com/turbomanage/storm/DatabaseHelper.java
public void backupAndRestore(Context ctx, SQLiteDatabase db) {
		if (backupAllTablesToCsv(ctx, db, null)) {
			dropAndCreate(db);
			restoreAllTablesFromCsv(ctx, db, null);
		} else {
			throw new RuntimeException("Backup of " + getDatabaseName() + " failed, aborting upgrade");
		}
	}
public void backupAndRestore(Context ctx, SQLiteDatabase db) {
		if (backupAllTablesToCsv(ctx, db, null)) {
			dropAndCreate(db);
			restoreAllTablesFromCsv(ctx, db, null);
		} else {
			throw new RuntimeException("Backup of " + getDatabaseName() + " failed, aborting upgrade");
		}
	}
public void backupAndRestore ( Context ctx , SQLiteDatabase db ) { if ( backupAllTablesToCsv ( ctx , db , null ) ) { dropAndCreate ( db ) ; restoreAllTablesFromCsv ( ctx , db , null ) ; } else { throw new RuntimeException ( "Backup of " + getDatabaseName ( ) + " failed, aborting upgrade" ) ; } }
Backs up all tables to CSV, drops and recreates them, then restores
them from CSV. By default, creates CSV filenames with no suffix. You
could override this method to supply a timestamp suffix (make sure it's
the same for both backup and restore), but beware that this could
cause backup files to proliferate. Ideally, this method should
clean up backup files after the database has been restored.

@param ctx
@param db
Backs up all tables to CSV drops and recreates them then restores them from CSV . By default creates CSV filenames with no suffix . You could override this method to supply a timestamp suffix ( make sure it s the same for both backup and restore ) but beware that this could cause backup files to proliferate . Ideally this method should clean up backup files after the database has been restored .