@@ -335,14 +335,23 @@ private void backup(Repository repository, Database db, BackupStmt stmt) throws
335
335
// Check if backup objects are valid
336
336
// This is just a pre-check to avoid most of invalid backup requests.
337
337
// Also calculate the signature for incremental backup check.
338
+ List <TableRef > tblRefsNotSupport = Lists .newArrayList ();
338
339
for (TableRef tblRef : tblRefs ) {
339
340
String tblName = tblRef .getName ().getTbl ();
340
341
Table tbl = db .getTableOrDdlException (tblName );
341
342
if (tbl .getType () == TableType .VIEW || tbl .getType () == TableType .ODBC ) {
342
343
continue ;
343
344
}
344
345
if (tbl .getType () != TableType .OLAP ) {
345
- ErrorReport .reportDdlException (ErrorCode .ERR_NOT_OLAP_TABLE , tblName );
346
+ if (Config .ignore_backup_not_support_table_type ) {
347
+ LOG .warn ("Table '{}' is a {} table, can not backup and ignore it."
348
+ + "Only OLAP(Doris)/ODBC/VIEW table can be backed up" ,
349
+ tblName , tbl .getType ().toString ());
350
+ tblRefsNotSupport .add (tblRef );
351
+ continue ;
352
+ } else {
353
+ ErrorReport .reportDdlException (ErrorCode .ERR_NOT_OLAP_TABLE , tblName );
354
+ }
346
355
}
347
356
348
357
OlapTable olapTbl = (OlapTable ) tbl ;
@@ -373,6 +382,8 @@ private void backup(Repository repository, Database db, BackupStmt stmt) throws
373
382
}
374
383
}
375
384
385
+ tblRefs .removeAll (tblRefsNotSupport );
386
+
376
387
// Check if label already be used
377
388
long repoId = -1 ;
378
389
if (repository != null ) {
0 commit comments