DROP DATABASE IF EXISTS zfsbackup;
create database zfsbackup;
use zfsbackup;
CREATE TABLE `alerts` (
  `Id` int(11) NOT NULL AUTO_INCREMENT,
  `Date` double DEFAULT 0,
  `Ident` varchar(255) DEFAULT '',
  `FileSystemType` varchar(20) DEFAULT 'ZFS',
  `AlertLevel` enum('EMERG','ALERT','CRITICAL','ERROR','WARNING','NOTICE','INFO','DEBUG','') DEFAULT NULL,
  `AlertType` varchar(40) DEFAULT '',
  `AlertText` varchar(1024) DEFAULT '',
  `Options` varchar(8192) DEFAULT '',
  `Ip` varchar(15) DEFAULT '',
  PRIMARY KEY (`Id`),
  KEY `Date` (`Date`),
  KEY `AlertLevel` (`AlertLevel`),
  KEY `Ident` (`Ident`),
  KEY `AlertType` (`AlertType`)
) ENGINE=InnoDB AUTO_INCREMENT=60889 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `alerts_graph` (
  `Id` int(11) NOT NULL AUTO_INCREMENT,
  `Date` double DEFAULT 0,
  `AlertIndex` int(11) DEFAULT 0,
  `Value` double DEFAULT 0,
  `Optimized` tinyint(4) DEFAULT 0,
  PRIMARY KEY (`Id`),
  KEY `Date` (`Date`),
  KEY `AlertIndex` (`AlertIndex`),
  KEY `Optimized` (`Optimized`)
) ENGINE=InnoDB AUTO_INCREMENT=12387602 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `alerts_index` (
  `Id` int(11) NOT NULL AUTO_INCREMENT,
  `Date` double DEFAULT 0,
  `Ident` varchar(255) DEFAULT '',
  `AlertType` varchar(80) DEFAULT '',
  `AlertExtra` varchar(80) DEFAULT '',
  PRIMARY KEY (`Id`),
  KEY `Date` (`Date`),
  KEY `Ident` (`Ident`),
  KEY `AlertType` (`AlertType`),
  KEY `AlertExtra` (`AlertExtra`)
) ENGINE=InnoDB AUTO_INCREMENT=226 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `backup_datasets` (
  `Id` int(11) NOT NULL AUTO_INCREMENT,
  `BackupId` int(11) DEFAULT 0,
  `Date` int(11) DEFAULT 0,
  `Name` varchar(255) DEFAULT '',
  `Used` bigint(20) DEFAULT 0,
  `Usedds` bigint(20) DEFAULT 0,
  `UsedSnap` bigint(20) DEFAULT 0,
  `Avail` bigint(20) DEFAULT 0,
  `Refer` bigint(20) DEFAULT 0,
  `Compress` varchar(10) DEFAULT '',
  `Ratio` double DEFAULT 0,
  `Dedup` varchar(10) DEFAULT '',
  `Quota` varchar(40) DEFAULT '',
  `ReadOnly` varchar(10) DEFAULT '',
  `Creation` bigint(20) DEFAULT 0,
  `Type` varchar(40) DEFAULT '',
  `MountPoint` varchar(255) DEFAULT '',
  PRIMARY KEY (`Id`),
  KEY `BackupId` (`BackupId`)
) ENGINE=InnoDB AUTO_INCREMENT=13713 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `backup_servers` (
  `Id` int(11) NOT NULL AUTO_INCREMENT,
  `BackupId` int(11) DEFAULT 0,
  `FileSystemType` varchar(20) DEFAULT 'ZFS',
  `Date` int(11) DEFAULT 0,
  `Updated` int(11) DEFAULT 0,
  `Dataset` varchar(255) DEFAULT '',
  `Server_Name` varchar(40) DEFAULT '',
  `Ssh` varchar(255) DEFAULT '',
  `Ssh_Port` int(11) DEFAULT 0,
  `Backup_Dataset` varchar(255) DEFAULT '',
  `BandWidth` varchar(20) DEFAULT '',
  `Active` int(11) DEFAULT 0,
  `Repl_id` varchar(20) DEFAULT '',
  `Replication_Identifier` varchar(40) DEFAULT '',
  `Ident` varchar(40) DEFAULT '',
  `Retention` varchar(1024) DEFAULT '',
  PRIMARY KEY (`Id`),
  UNIQUE KEY `Server_Name` (`Server_Name`,`Backup_Dataset`),
  KEY `BackupId` (`BackupId`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `config_backup` (
  `Id` int(11) NOT NULL AUTO_INCREMENT,
  `Date` double DEFAULT 0,
  `BackupId` int(11) DEFAULT 0,
  `BackupIdent` varchar(255) DEFAULT '',
  `UserName` varchar(80) DEFAULT '',
  `Clone_Dir` varchar(255) DEFAULT '',
  `Datasets` longtext DEFAULT '',
  `Period` varchar(255) DEFAULT '',
  `Backup` varchar(255) DEFAULT '',
  `BackupServers` mediumtext DEFAULT '',
  `Identifier` varchar(255) DEFAULT '',
  `Replication_Identifier` varchar(255) DEFAULT '',
  `Snapshot_FromDiskUsage` varchar(20) DEFAULT '',
  `Backup_FromDiskUsage` varchar(20) DEFAULT '',
  `ZfsSendDelay` int(11) DEFAULT 0,
  `Code` longtext DEFAULT '',
  PRIMARY KEY (`Id`),
  UNIQUE KEY `BackupIdent` (`BackupIdent`),
  KEY `Date` (`Date`),
  KEY `BackupId` (`BackupId`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `config_backup_undo` (
  `Id` int(11) NOT NULL AUTO_INCREMENT,
  `Date` double DEFAULT 0,
  `BackupIdent` varchar(255) DEFAULT '',
  `UserName` varchar(80) DEFAULT '',
  `ShaCode` varchar(40) DEFAULT '',
  `UndoCode` longtext DEFAULT '',
  PRIMARY KEY (`Id`),
  KEY `Date` (`Date`),
  KEY `BackupIdent` (`BackupIdent`),
  KEY `UserName` (`UserName`),
  KEY `ShaCode` (`ShaCode`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `config_files` (
  `Id` int(11) NOT NULL AUTO_INCREMENT,
  `Date` double DEFAULT 0,
  `BackupIdent` varchar(255) DEFAULT '',
  `Current_Dir` varchar(255) DEFAULT '',
  `FileName` varchar(255) DEFAULT '',
  `FileSize` int(11) DEFAULT 0,
  `FileDate` int(11) DEFAULT 0,
  PRIMARY KEY (`Id`),
  KEY `Date` (`Date`),
  KEY `FileName` (`FileName`),
  KEY `BackupIdent` (`BackupIdent`)
) ENGINE=InnoDB AUTO_INCREMENT=2546 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `fastlog` (
  `Id` int(11) NOT NULL AUTO_INCREMENT,
  `LogType` enum('log','modify_log','job_log','') DEFAULT '',
  `LogId` int(11) DEFAULT 0,
  `Date` double DEFAULT 0,
  `Ip` varchar(15) DEFAULT '',
  `Logged_Ip` int(11) DEFAULT 0,
  `is_Java` int(11) DEFAULT 0,
  `Sessions` int(11) DEFAULT 0,
  `UsedTime` double DEFAULT 0,
  PRIMARY KEY (`Id`),
  UNIQUE KEY `Date` (`Date`),
  KEY `LogType` (`LogType`),
  KEY `LogId` (`LogId`),
  KEY `Ip` (`Ip`),
  KEY `Logged_Ip` (`Logged_Ip`),
  KEY `UsedTime` (`UsedTime`),
  KEY `is_Java` (`is_Java`),
  KEY `Sessions` (`Sessions`)
) ENGINE=InnoDB AUTO_INCREMENT=35371 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
CREATE TABLE `fastlog_info` (
  `Id` int(11) NOT NULL AUTO_INCREMENT,
  `LogType` enum('log','modify_log','job_log','') DEFAULT '',
  `Date` double DEFAULT 0,
  `UserName` varchar(80) DEFAULT '',
  `Cmd` varchar(80) DEFAULT '',
  `Agent` text DEFAULT '',
  `Info` text DEFAULT '',
  `Shacode` varchar(40) DEFAULT '',
  `is_Bot` int(11) DEFAULT -1,
  `ResultCode` int(11) DEFAULT -1,
  PRIMARY KEY (`Id`),
  UNIQUE KEY `ShaCode` (`Shacode`),
  KEY `LogType` (`LogType`),
  KEY `Date` (`Date`),
  KEY `is_Bot` (`is_Bot`),
  KEY `ResultCode` (`ResultCode`),
  KEY `UserName` (`UserName`),
  KEY `Cmd` (`Cmd`)
) ENGINE=InnoDB AUTO_INCREMENT=1336 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
CREATE TABLE `fetcher` (
  `Id` int(11) NOT NULL AUTO_INCREMENT,
  `Date` double DEFAULT 0,
  `FetcherId` int(11) DEFAULT 0,
  `FetcherCompany` varchar(80) DEFAULT '',
  `FetcherComputer` varchar(80) DEFAULT '',
  `UserName` varchar(80) DEFAULT '',
  `Insane_Logger_Load` double DEFAULT 1,
  `Active` int(11) DEFAULT 0,
  PRIMARY KEY (`Id`),
  UNIQUE KEY `FetcherComputer` (`FetcherComputer`,`FetcherCompany`),
  KEY `Date` (`Date`),
  KEY `FetcherId` (`FetcherId`),
  KEY `Active` (`Active`)
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `fetcher_job` (
  `Id` int(11) NOT NULL AUTO_INCREMENT,
  `Date` double DEFAULT 0,
  `UserIdent` varchar(255) DEFAULT '',
  `Ident` varchar(255) DEFAULT '',
  `runCommand` varchar(80) DEFAULT '',
  `Command` varchar(80) DEFAULT '',
  `Active` int(11) DEFAULT 1,
  `FetchTime` double DEFAULT 0,
  `TimeUsed` double DEFAULT 0,
  PRIMARY KEY (`Id`),
  KEY `Date` (`Date`),
  KEY `Ident` (`Ident`),
  KEY `runCommand` (`runCommand`),
  KEY `Command` (`Command`),
  KEY `Active` (`Active`),
  KEY `TimeUsed` (`TimeUsed`),
  KEY `UserIdent` (`UserIdent`)
) ENGINE=InnoDB AUTO_INCREMENT=6581 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `maintain_snapshots` (
  `Id` int(11) NOT NULL AUTO_INCREMENT,
  `Ident` varchar(80) DEFAULT '',
  `BackupType` varchar(80) DEFAULT '',
  `Date` int(11) DEFAULT 0,
  `Dataset` varchar(255) DEFAULT '',
  `Name` varchar(255) DEFAULT '',
  `Used` bigint(20) DEFAULT 0,
  `Refer` bigint(20) DEFAULT 0,
  `Creation` bigint(20) DEFAULT 0,
  `Guid` varchar(40) DEFAULT '',
  `Active` int(11) DEFAULT 0,
  PRIMARY KEY (`Id`),
  KEY `Ident` (`Ident`),
  KEY `BackupType` (`BackupType`),
  KEY `Guid` (`Guid`),
  KEY `Dataset` (`Dataset`),
  KEY `Creation` (`Creation`),
  KEY `Name` (`Name`),
  KEY `Active` (`Active`)
) ENGINE=InnoDB AUTO_INCREMENT=205101 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `mem_table` (
  `Date` double DEFAULT NULL,
  `Line` varchar(2048) DEFAULT NULL,
  `LineLength` int(11) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
CREATE TABLE `restore_all_snapshots` (
  `Id` int(11) NOT NULL AUTO_INCREMENT,
  `BackupId` int(11) DEFAULT 0,
  `ServerId` int(11) DEFAULT 0,
  `Date` int(11) DEFAULT 0,
  `Dataset` varchar(255) DEFAULT '',
  `Name` varchar(255) DEFAULT '',
  `Used` bigint(20) DEFAULT 0,
  `Refer` bigint(20) DEFAULT 0,
  `Creation` bigint(20) DEFAULT 0,
  `Guid` varchar(40) DEFAULT '',
  PRIMARY KEY (`Id`),
  KEY `BackupId` (`BackupId`),
  KEY `ServerId` (`ServerId`),
  KEY `Guid` (`Guid`),
  KEY `Dataset` (`Dataset`),
  KEY `Creation` (`Creation`),
  KEY `Name` (`Name`)
) ENGINE=InnoDB AUTO_INCREMENT=7608 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `restore_datasets` (
  `Id` int(11) NOT NULL AUTO_INCREMENT,
  `BackupId` int(11) DEFAULT 0,
  `Date` int(11) DEFAULT 0,
  `Name` varchar(255) DEFAULT '',
  `Used` bigint(20) DEFAULT 0,
  `Usedds` bigint(20) DEFAULT 0,
  `UsedSnap` bigint(20) DEFAULT 0,
  `Avail` bigint(20) DEFAULT 0,
  `Refer` bigint(20) DEFAULT 0,
  `Compress` varchar(10) DEFAULT '',
  `Ratio` double DEFAULT 0,
  `Dedup` varchar(10) DEFAULT '',
  `Quota` varchar(40) DEFAULT '',
  `ReadOnly` varchar(10) DEFAULT '',
  `Creation` bigint(20) DEFAULT 0,
  `Type` varchar(40) DEFAULT '',
  `MountPoint` varchar(255) DEFAULT '',
  PRIMARY KEY (`Id`),
  KEY `BackupId` (`BackupId`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `restore_servers` (
  `Id` int(11) NOT NULL AUTO_INCREMENT,
  `BackupId` int(11) DEFAULT 0,
  `Date` int(11) DEFAULT 0,
  `Updated` int(11) DEFAULT 0,
  `Dataset` varchar(255) DEFAULT '',
  `Root_Dir` varchar(255) DEFAULT '',
  `Server_Name` varchar(40) DEFAULT '',
  `Ssh` varchar(255) DEFAULT '',
  `Ssh_Port` int(11) DEFAULT 0,
  `Backup_Dataset` varchar(255) DEFAULT '',
  `BandWidth` varchar(20) DEFAULT '',
  `Active` int(11) DEFAULT 0,
  `Repl_id` varchar(20) DEFAULT '',
  `Replication_Identifier` varchar(40) DEFAULT '',
  `Ident` varchar(40) DEFAULT '',
  `Clone_Dir` varchar(255) DEFAULT '',
  `Retention` varchar(1024) DEFAULT '',
  PRIMARY KEY (`Id`),
  UNIQUE KEY `Server_Name` (`Server_Name`,`Backup_Dataset`),
  KEY `BackupId` (`BackupId`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `settings` (
  `Id` int(11) NOT NULL AUTO_INCREMENT,
  `Date` int(11) DEFAULT 0,
  `Settings` text DEFAULT '',
  PRIMARY KEY (`Id`),
  KEY `Date` (`Date`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `smartctl_index` (
  `Id` int(11) NOT NULL AUTO_INCREMENT,
  `Date` int(11) DEFAULT 0,
  `Model` varchar(255) DEFAULT '',
  `Serial` varchar(255) DEFAULT '',
  `Device` varchar(255) DEFAULT '',
  PRIMARY KEY (`Id`),
  KEY `Date` (`Date`),
  KEY `Model` (`Model`),
  KEY `Serial` (`Serial`),
  KEY `Device` (`Device`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `smartctl_status` (
  `Id` int(11) NOT NULL AUTO_INCREMENT,
  `Ident` varchar(80) DEFAULT '',
  `Date` int(11) DEFAULT 0,
  `SmartIndex` int(11) DEFAULT 0,
  `TimeInterval` double DEFAULT 0,
  `nRead` double DEFAULT 0,
  `nWrite` double DEFAULT 0,
  `Read_Sec` double DEFAULT 0,
  `Write_Sec` double DEFAULT 0,
  PRIMARY KEY (`Id`),
  KEY `Date` (`Date`),
  KEY `Ident` (`Ident`),
  KEY `SmartIndex` (`SmartIndex`),
  KEY `Read_Sec` (`Read_Sec`),
  KEY `Write_Sec` (`Write_Sec`)
) ENGINE=InnoDB AUTO_INCREMENT=863094 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `users` (
  `Id` int(11) NOT NULL AUTO_INCREMENT,
  `Date` double DEFAULT 0,
  `FullName` varchar(80) DEFAULT '',
  `UserName` varchar(80) DEFAULT '',
  `Password` varchar(64) DEFAULT '',
  `Zip` varchar(45) DEFAULT '',
  `Country` varchar(2) DEFAULT '',
  `Email` varchar(255) DEFAULT '',
  `Phone` varchar(45) DEFAULT '',
  `ShaCode` varchar(40) DEFAULT '',
  `Admin` tinyint(4) DEFAULT 0,
  `Active` tinyint(4) DEFAULT 1,
  `Permission` text DEFAULT '',
  `Settings` varchar(1024) DEFAULT '',
  PRIMARY KEY (`Id`),
  UNIQUE KEY `Username` (`UserName`),
  KEY `Password` (`Password`),
  KEY `ShaCode` (`ShaCode`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `zfs_influxdb` (
  `Id` int(11) NOT NULL AUTO_INCREMENT,
  `Date` double DEFAULT 0,
  `LogData` longblob DEFAULT '',
  PRIMARY KEY (`Id`),
  KEY `Date` (`Date`)
) ENGINE=InnoDB AUTO_INCREMENT=468157 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPRESSED;
CREATE TABLE `zfs_logs` (
  `Id` int(11) NOT NULL AUTO_INCREMENT,
  `Date` double DEFAULT 0,
  `Parsed` int(11) DEFAULT 0,
  `FromDate` double DEFAULT 0,
  `ToDate` double DEFAULT 0,
  `ReplicaIdent` varchar(80) DEFAULT '',
  `FetcherCompany` varchar(80) DEFAULT '',
  `FetcherComputer` varchar(80) DEFAULT '',
  `DataLength` int(11) DEFAULT 0,
  `LineNumber` int(11) DEFAULT 0,
  `NewestShaCode` varchar(40) DEFAULT '',
  `ShaCode` varchar(40) DEFAULT '',
  `LogData` longblob DEFAULT '',
  `TimeUsed` double DEFAULT 0,
  PRIMARY KEY (`Id`),
  KEY `ReplicaIdent` (`ReplicaIdent`),
  KEY `Parsed` (`Parsed`),
  KEY `Date` (`Date`),
  KEY `FromDate` (`FromDate`),
  KEY `ToDate` (`ToDate`),
  KEY `ShaCode` (`ShaCode`)
) ENGINE=InnoDB AUTO_INCREMENT=152165 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `zfs_race` (
  `Id` int(11) NOT NULL AUTO_INCREMENT,
  `Date` double DEFAULT 0,
  `Version` varchar(10) DEFAULT '',
  `ZfsType` varchar(10) DEFAULT '',
  `Cmd` varchar(40) DEFAULT '',
  `FlowId` varchar(20) DEFAULT '',
  `Backup_Ident` varchar(80) DEFAULT '',
  `Extra` varchar(1024) DEFAULT '',
  `Uuid` varchar(80) DEFAULT '',
  `Ssh_Server` varchar(80) DEFAULT '',
  `Datasets` int(11) DEFAULT 0,
  `BackupType` enum('FULL','INC','CLONE','DRY_RUN','RECV','') DEFAULT '',
  `Rating` enum('SUCCESS','FAILURE','') DEFAULT '',
  `TimeUsed` double DEFAULT 0,
  PRIMARY KEY (`Id`),
  KEY `Date` (`Date`),
  KEY `Backup_Ident` (`Backup_Ident`),
  KEY `Uuid` (`Uuid`),
  KEY `FlowId` (`FlowId`),
  KEY `Cmd` (`Cmd`),
  KEY `ZfsType` (`ZfsType`),
  KEY `BackupType` (`BackupType`)
) ENGINE=InnoDB AUTO_INCREMENT=3039704 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `zfs_remote_snapshots` (
  `Id` int(11) NOT NULL AUTO_INCREMENT,
  `Date` double DEFAULT 0,
  `Backup_Ident` varchar(80) DEFAULT '',
  `Server_Name` varchar(40) DEFAULT '',
  `Backup_Dataset` varchar(255) DEFAULT '',
  `Root_Dir` varchar(255) DEFAULT '',
  `Datasets` int(11) DEFAULT 0,
  `SnapShots` int(11) DEFAULT 0,
  `OldestCreation` bigint(20) DEFAULT 0,
  `NewestCreation` bigint(20) DEFAULT 0,
  `OldestName` varchar(255) DEFAULT '',
  `NewestName` varchar(255) DEFAULT '',
  `Guid` varchar(40) DEFAULT '',
  `SnapShotData` longblob DEFAULT '',
  `TimeUsed` double DEFAULT 0,
  PRIMARY KEY (`Id`),
  UNIQUE KEY `Server_Name` (`Server_Name`,`Backup_Dataset`),
  KEY `Date` (`Date`),
  KEY `Backup_Ident` (`Backup_Ident`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `zfs_reset_password` (
  `Id` int(11) NOT NULL AUTO_INCREMENT,
  `User_Id` int(11) NOT NULL,
  `Password_Key` varchar(64) NOT NULL,
  `Date` double DEFAULT 0,
  PRIMARY KEY (`Id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
truncate table alerts;
truncate table alerts_graph;
truncate table alerts_index;
truncate table backup_datasets;
truncate table backup_servers;
truncate table config_backup;
truncate table config_backup_undo;
truncate table config_files;
truncate table fastlog;
truncate table fastlog_info;
truncate table fetcher;
truncate table fetcher_job;
truncate table maintain_snapshots;
truncate table mem_table;
truncate table restore_all_snapshots;
truncate table restore_datasets;
truncate table restore_servers;
truncate table settings;
truncate table smartctl_index;
truncate table smartctl_status;
truncate table users;
truncate table zfs_influxdb;
truncate table zfs_logs;
truncate table zfs_race;
truncate table zfs_remote_snapshots;
truncate table zfs_reset_password;
