diff --git a/tools/src/main/java/com/orientechnologies/orient/console/OConsoleDatabaseApp.java b/tools/src/main/java/com/orientechnologies/orient/console/OConsoleDatabaseApp.java
index <HASH>..<HASH> 100644
--- a/tools/src/main/java/com/orientechnologies/orient/console/OConsoleDatabaseApp.java
+++ b/tools/src/main/java/com/orientechnologies/orient/console/OConsoleDatabaseApp.java
@@ -2211,12 +2211,15 @@ public class OConsoleDatabaseApp extends OrientConsole implements OCommandOutput
         final FileOutputStream fos = new FileOutputStream(fileName);

         try {

           currentDatabase.backup(fos, null, null, this, compressionLevel, bufferSize);

-

-        } finally {

           fos.flush();

           fos.close();

-

           message("\nBackup executed in %.2f seconds", ((float) (System.currentTimeMillis() - startTime) / 1000));

+        } catch (RuntimeException e) {

+          fos.close();

+          File f = new File(fileName);

+          if (f.exists())

+            f.delete();

+          throw e;

         }

       }

     } catch (ODatabaseExportException e) {
removed eventual backup file if the backup operation fail