class Backup extends ManipulationStatement {

    private String fileName;
    private String lastDate;

    public Backup(ServerSession session) {
        super(session);
    }

    @Override
    public int getType() {
        return SQLStatement.BACKUP;
    }

    @Override
    public boolean needRecompile() {
        return false;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public void setLastDate(String lastDate) {
        this.lastDate = lastDate;
    }

    @Override
    public int update() {<FILL_FUNCTION_BODY>}
}

        session.getUser().checkAdmin();
        Database db = session.getDatabase();
        if (!db.isPersistent()) {
            throw DbException.get(ErrorCode.DATABASE_IS_NOT_PERSISTENT);
        }
        Long ld = lastDate != null ? Date.valueOf(lastDate).getTime() : null;
        db.backupTo(fileName, ld);
        return 0;
    
<methods>public void <init>(com.lealone.db.session.ServerSession) <variables>