├── .idea ├── misc.xml ├── vcs.xml ├── .gitignore ├── modules.xml ├── Duplicati_Monitor.iml ├── deployment.xml ├── dataSources.xml ├── php.xml └── inspectionProfiles │ └── Project_Default.xml ├── private_duplicati ├── LoginConnection │ └── connection.php └── receive.php ├── public ├── js │ └── script.js ├── backupDetails.php ├── css │ └── style.css ├── backUpReports.php └── index.php ├── LICENSE └── duplicati_monitoring.sql /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Editor-based HTTP Client requests 5 | /httpRequests/ 6 | # Datasource local storage ignored files 7 | /dataSources/ 8 | /dataSources.local.xml 9 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/Duplicati_Monitor.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/deployment.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /private_duplicati/LoginConnection/connection.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | mysql.8 6 | true 7 | com.mysql.cj.jdbc.Driver 8 | jdbc:mysql://localhost:3306 9 | $ProjectFileDir$ 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/php.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 9 | 10 | 13 | 14 | 15 | 17 | 18 | 20 | -------------------------------------------------------------------------------- /public/js/script.js: -------------------------------------------------------------------------------- 1 | function updateProgress(selector, endValue) { 2 | let circularProgress = document.querySelector('.circular-progress' + selector), 3 | progressValue = document.querySelector('.progress-value' + selector); 4 | 5 | let progressStartValue = 0, 6 | speed = 5; 7 | 8 | let progress = setInterval(() => { 9 | 10 | 11 | let displayedProgress = (progressStartValue / 10).toFixed(1); 12 | progressValue.textContent = `${displayedProgress}%`; 13 | circularProgress.style.background = `conic-gradient(#4354A1FF ${displayedProgress * 3.6}deg, #7c7272 0deg)`; 14 | 15 | if (progressStartValue === endValue) { 16 | clearInterval(progress); 17 | } 18 | progressStartValue += 1; 19 | }, speed); 20 | } 21 | 22 | let progressEndValue24 = Math.floor(percentage24 * 10); 23 | updateProgress('-24h', progressEndValue24); 24 | 25 | let progressEndValue7 = Math.floor(percentage7 * 10); 26 | updateProgress('-7d', progressEndValue7); 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Maxence Albanese 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 30 | -------------------------------------------------------------------------------- /public/backupDetails.php: -------------------------------------------------------------------------------- 1 | 15 | 16 | 17 | 18 | 19 | 21 | 22 | Duplicati Monitor - Details 23 | 24 | 25 | 26 |
27 |

Duplicati Monitor - Details

28 |
29 |
30 | 36 |
37 | 38 | "; 41 | echo ""; 42 | echo ""; 43 | echo ""; 44 | } 45 | ?> 46 |
" . array_keys($row)[$i] . "" . array_values($row)[$i] . "
47 |
48 |
49 | 50 | 51 | -------------------------------------------------------------------------------- /private_duplicati/receive.php: -------------------------------------------------------------------------------- 1 | prepare("INSERT INTO backup_reports (date, operation, extraResult, duration, nameOfComputer, deletedFiles, deletedFolders, modifiedFiles, examinedFiles, openedFiles, addedFiles, sizeOfModifiedFiles) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"); 31 | $stmt->bind_param("sssssiiisiii", $now, $operationName, $extraResult, $duration, $nameOfComputer, $deletedFiles, $deletedFolders, $modifiedFiles, $examinedFiles, $openedFiles, $addedFiles, $sizeOfModifiedFiles); 32 | 33 | $execResult = $stmt->execute(); 34 | 35 | if ($execResult) { 36 | http_response_code(200); 37 | unlink('data.json'); 38 | } else { 39 | http_response_code(400); 40 | } 41 | } 42 | mysqli_close($connection); 43 | -------------------------------------------------------------------------------- /public/css/style.css: -------------------------------------------------------------------------------- 1 | /* General Reset */ 2 | * { 3 | margin: 0; 4 | padding: 0; 5 | box-sizing: border-box; 6 | } 7 | 8 | body { 9 | font-family: Arial, sans-serif; 10 | background-color: #f2f2f2; 11 | margin: 0; 12 | padding: 0; 13 | } 14 | 15 | header { 16 | background-color: #333; 17 | color: #fff; 18 | padding: 20px; 19 | text-align: center; 20 | } 21 | 22 | main { 23 | display: flex; 24 | flex-wrap: wrap; 25 | justify-content: space-between; 26 | padding: 20px; 27 | } 28 | 29 | aside { 30 | flex: 0 0 200px; 31 | background-color: #ddd; 32 | padding: 20px; 33 | position: sticky; 34 | top: 20px; 35 | border-radius: 5px; 36 | z-index: 50; 37 | } 38 | 39 | aside ol { 40 | list-style-type: none; 41 | } 42 | 43 | aside ol li { 44 | margin-bottom: 10px; 45 | } 46 | 47 | a{ 48 | color: rgba(0, 122, 253, 0.89); 49 | text-decoration: none; 50 | } 51 | 52 | a:hover { 53 | color: #666; 54 | } 55 | 56 | .wrapper { 57 | flex: 0 0 calc(100% - 240px); 58 | padding: 20px; 59 | } 60 | 61 | .container-wheels, 62 | .container-graph { 63 | flex: 0 0 100%; 64 | padding-top: 20px; 65 | } 66 | 67 | .container-wheels { 68 | display: flex; 69 | justify-content: space-between; 70 | padding: 10px 20px; 71 | } 72 | 73 | .wheel{ 74 | flex: 0 0 30%; 75 | padding-top: 20px; 76 | background-color: #fff; 77 | border-radius: 5px; 78 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); 79 | display: flex; 80 | flex-direction: column; 81 | align-items: center; 82 | justify-content: center; 83 | } 84 | 85 | button{ 86 | padding: 10px 20px; 87 | margin: 15px 0; 88 | border: none; 89 | border-radius: 5px; 90 | background-color: #007AFF; 91 | color: #fff; 92 | cursor: pointer; 93 | } 94 | 95 | .graph { 96 | background-color: #fff; 97 | border: 1px solid #ccc; 98 | border-radius: 5px; 99 | padding: 20px; 100 | } 101 | 102 | #chartContainer { 103 | height: 370px; 104 | width: 100%; 105 | } 106 | 107 | /*Styling for wheel circles */ 108 | .wheel__circle { 109 | width: 150px; 110 | height: 150px; 111 | border-radius: 50%; 112 | background-color: #e0e0e0; 113 | display: flex; 114 | justify-content: center; 115 | align-items: center; 116 | } 117 | 118 | .wheel__circle__inner { 119 | text-align: center; 120 | } 121 | 122 | .wheel__circle__inner__text { 123 | font-size: 24px; 124 | font-weight: bold; 125 | } 126 | 127 | .wheel__circle__inner__label { 128 | font-size: 14px; 129 | color: #666; 130 | } 131 | 132 | dialog { 133 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); 134 | padding: 20px; 135 | margin: 20px; 136 | background-color: #fff; 137 | position: fixed; 138 | top: 50%; 139 | left: 50%; 140 | transform: translate(-50%, -50%); 141 | z-index: 100; 142 | } 143 | 144 | dialog li{ 145 | margin-bottom: 10px; 146 | margin-left: 20px; 147 | } 148 | 149 | table { 150 | border-collapse: collapse; 151 | width: 100%; 152 | } 153 | 154 | table th, table td { 155 | border: 1px solid #ddd; 156 | padding: 8px; 157 | text-align: left; 158 | } 159 | 160 | 161 | 162 | .circular-progress { 163 | width: 150px; 164 | height: 150px; 165 | border-radius: 50%; 166 | display: flex; 167 | align-items: center; 168 | justify-content: center; 169 | } 170 | 171 | .circular-progress::before { 172 | content: ""; 173 | position: absolute; 174 | height: 130px; 175 | width: 130px; 176 | border-radius: 50%; 177 | background: #eaeaea; 178 | } 179 | 180 | .progress-value { 181 | position: absolute; 182 | font-size: 25px; 183 | font-weight: 600; 184 | color: #4354A1FF; 185 | } 186 | 187 | /*Dialog Styles*/ 188 | dialog { 189 | background: white; 190 | max-width: 400px; 191 | padding: 2rem 3rem 1rem; 192 | border-radius: 20px; 193 | border: 0; 194 | box-shadow: 0 5px 30px 0 rgb(0 0 0 / 10%); 195 | animation: fadeIn 1s ease both; 196 | &::backdrop { 197 | animation: fadeIn 1s ease both; 198 | background: rgb(255 255 255 / 40%); 199 | z-index: 2; 200 | backdrop-filter: blur(20px); 201 | } 202 | .x { 203 | filter: grayscale(1); 204 | border: none; 205 | background: none; 206 | position: absolute; 207 | top: 15px; 208 | right: 10px; 209 | transition: ease filter, transform 0.3s; 210 | cursor: pointer; 211 | transform-origin: center; 212 | &:hover { 213 | filter: grayscale(0); 214 | transform: scale(1.1); 215 | } 216 | } 217 | h2 { 218 | font-weight: 600; 219 | font-size: 2rem; 220 | padding-bottom: 1rem; 221 | } 222 | p { 223 | font-size: 1rem; 224 | line-height: 1.3rem; 225 | padding: 0.5rem 0; 226 | } 227 | } 228 | 229 | 230 | @keyframes fadeIn { 231 | from { 232 | opacity: 0; 233 | } 234 | to { 235 | opacity: 1; 236 | } 237 | } 238 | 239 | @keyframes fadeOut { 240 | from { 241 | opacity: 1; 242 | } 243 | to { 244 | opacity: 0; 245 | } 246 | } -------------------------------------------------------------------------------- /public/backUpReports.php: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | 15 | 16 | Duplicati Monitor - Backup Reports 17 | 18 | 19 | 20 |
21 |

Duplicati Monitor - Backup Reports

22 |
23 |
24 | 30 |
31 |

Number of backup reports:

32 | 33 | 34 | 38 | 41 | 44 | 47 | 50 | 53 | 54 | 55 | "; 58 | echo ""; 59 | echo ""; 60 | echo ""; 61 | echo ""; 62 | echo ""; 63 | echo ""; 64 | echo ""; 65 | echo ""; 66 | } 67 | ?> 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 122 | -------------------------------------------------------------------------------- /duplicati_monitoring.sql: -------------------------------------------------------------------------------- 1 | -- phpMyAdmin SQL Dump 2 | -- version 5.2.1 3 | -- https://www.phpmyadmin.net/ 4 | -- 5 | -- Hôte : 127.0.0.1 6 | -- Généré le : jeu. 21 mars 2024 à 08:43 7 | -- Version du serveur : 10.4.28-MariaDB 8 | -- Version de PHP : 8.2.4 9 | 10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; 11 | START TRANSACTION; 12 | SET time_zone = "+00:00"; 13 | 14 | 15 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 16 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 17 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 18 | /*!40101 SET NAMES utf8mb4 */; 19 | 20 | -- 21 | -- Base de données : `duplicati_monitoring` 22 | -- 23 | 24 | -- -------------------------------------------------------- 25 | 26 | -- 27 | -- Structure de la table `backup_reports` 28 | -- 29 | 30 | CREATE TABLE `backup_reports` ( 31 | `id` int(11) NOT NULL, 32 | `date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), 33 | `operation` varchar(255) DEFAULT NULL, 34 | `extraResult` varchar(255) DEFAULT NULL, 35 | `duration` time DEFAULT NULL, 36 | `nameOfComputer` varchar(255) DEFAULT NULL, 37 | `deletedFiles` int(11) DEFAULT NULL, 38 | `deletedFolders` int(11) DEFAULT NULL, 39 | `modifiedFiles` int(11) DEFAULT NULL, 40 | `examinedFiles` int(11) DEFAULT NULL, 41 | `openedFiles` int(11) DEFAULT NULL, 42 | `addedFiles` int(11) DEFAULT NULL, 43 | `sizeOfModifiedFiles` bigint(20) DEFAULT NULL, 44 | `sizeOfAddedFiles` bigint(20) DEFAULT NULL, 45 | `sizeOfExaminedFiles` bigint(20) DEFAULT NULL, 46 | `sizeOfOpenedFiles` bigint(20) DEFAULT NULL, 47 | `notProcessedFiles` int(11) DEFAULT NULL, 48 | `addedFolders` int(11) DEFAULT NULL, 49 | `tooLargeFiles` int(11) DEFAULT NULL, 50 | `filesWithError` int(11) DEFAULT NULL, 51 | `modifiedFolders` int(11) DEFAULT NULL, 52 | `modifiedSymlinks` int(11) DEFAULT NULL, 53 | `addedSymlinks` int(11) DEFAULT NULL, 54 | `deletedSymlinks` int(11) DEFAULT NULL, 55 | `partialBackup` tinyint(1) DEFAULT NULL, 56 | `dryrun` tinyint(1) DEFAULT NULL, 57 | `mainOperation` varchar(255) DEFAULT NULL, 58 | `compactResults` varchar(255) DEFAULT NULL, 59 | `parsedResult` varchar(255) DEFAULT NULL, 60 | `version` varchar(255) DEFAULT NULL, 61 | `endTime` datetime DEFAULT NULL, 62 | `beginTime` datetime DEFAULT NULL, 63 | `messages` int(11) DEFAULT NULL, 64 | `warnings` int(11) DEFAULT NULL, 65 | `errors` int(11) DEFAULT NULL 66 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; 67 | 68 | -- 69 | -- Déchargement des données de la table `backup_reports` 70 | -- 71 | 72 | INSERT INTO `backup_reports` (`id`, `date`, `operation`, `extraResult`, `duration`, `nameOfComputer`, `deletedFiles`, `deletedFolders`, `modifiedFiles`, `examinedFiles`, `openedFiles`, `addedFiles`, `sizeOfModifiedFiles`, `sizeOfAddedFiles`, `sizeOfExaminedFiles`, `sizeOfOpenedFiles`, `notProcessedFiles`, `addedFolders`, `tooLargeFiles`, `filesWithError`, `modifiedFolders`, `modifiedSymlinks`, `addedSymlinks`, `deletedSymlinks`, `partialBackup`, `dryrun`, `mainOperation`, `compactResults`, `parsedResult`, `version`, `endTime`, `beginTime`, `messages`, `warnings`, `errors`) VALUES 73 | (1, '2024-03-15 10:25:28', 'Backup', 'Success', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), 74 | (2, '2024-03-15 10:27:08', 'Backup', 'Success', '00:00:07', '0', 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), 75 | (3, '2024-03-15 10:29:21', 'Backup', 'Success', '00:00:07', '0', 0, 0, 0, 3388, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), 76 | (4, '2024-03-15 13:12:42', 'Backup', 'Success', '00:00:07', '0', 0, 0, 0, 3388, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), 77 | (5, '2024-03-15 13:14:38', 'Backup', 'Success', '00:00:06', 'Bureau-albanese', 0, 0, 0, 3388, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), 78 | (6, '2024-03-15 14:48:56', 'Backup', 'Success', '00:00:03', 'Bureau-albanese', 0, 0, 0, 3388, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), 79 | (7, '2024-03-18 07:45:14', 'Backup', 'Success', '00:00:10', 'Bureau-albanese', 0, 0, 0, 3388, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), 80 | (8, '2024-03-18 09:45:05', 'Backup', 'Success', '00:00:09', 'Bureau-albanese', 0, 0, 0, 3388, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), 81 | (9, '2024-03-18 14:13:00', NULL, NULL, NULL, 'Computer977', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), 82 | (10, '2024-03-18 14:13:00', NULL, NULL, NULL, 'Computer670', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), 83 | (11, '2024-03-18 14:13:00', NULL, NULL, NULL, 'Computer417', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), 84 | (12, '2024-03-18 14:13:00', NULL, NULL, NULL, 'Computer76', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), 85 | (13, '2024-03-18 14:13:00', NULL, NULL, NULL, 'Computer128', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), 86 | (14, '2024-03-18 14:13:00', NULL, NULL, NULL, 'Computer413', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), 87 | (15, '2024-03-18 14:13:00', NULL, NULL, NULL, 'Computer679', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), 88 | (16, '2024-03-18 14:13:00', NULL, NULL, NULL, 'Computer156', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), 89 | (17, '2024-03-18 14:13:00', NULL, NULL, NULL, 'Computer742', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), 90 | (18, '2024-03-18 14:13:00', NULL, NULL, NULL, 'Computer240', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), 91 | (138, '2024-03-21 07:10:34', 'Backup', 'Success', '00:00:08', 'Bureau-albanese', 0, 0, 0, 3388, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), 92 | (139, '2024-03-21 07:15:54', 'Backup', 'Success', '00:00:06', 'Bureau-albanese', 0, 0, 0, 3388, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); 93 | 94 | -- 95 | -- Index pour les tables déchargées 96 | -- 97 | 98 | -- 99 | -- Index pour la table `backup_reports` 100 | -- 101 | ALTER TABLE `backup_reports` 102 | ADD PRIMARY KEY (`id`); 103 | 104 | -- 105 | -- AUTO_INCREMENT pour les tables déchargées 106 | -- 107 | 108 | -- 109 | -- AUTO_INCREMENT pour la table `backup_reports` 110 | -- 111 | ALTER TABLE `backup_reports` 112 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=140; 113 | COMMIT; 114 | 115 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 116 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 117 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 118 | -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | = 0; $i--) { 28 | $date = strtotime("-$i days"); 29 | $formattedDate = date('d-m-Y', $date); // Format date in DD-MM-YYYY 30 | 31 | $dayIndex = (date('N', $date) + 5) % 7; 32 | $dataPoints[] = array( 33 | "label" => $formattedDate, // Use "label" for custom X-axis display 34 | "y" => $numberOfBackupsPerDay[$dayIndex] 35 | ); 36 | } 37 | 38 | 39 | // Part for the circles 40 | $queryNumberOfBackups = "SELECT * FROM backup_reports"; 41 | $resultNumberOfBackups = mysqli_query($connection, $queryNumberOfBackups); 42 | $numberOfBackup = mysqli_num_rows($resultNumberOfBackups); 43 | 44 | $toDate = date('Y-m-d'); 45 | $date24h = date('Y-m-d', strtotime('-1 day')); 46 | $date7j = date('Y-m-d', strtotime('-7 days')); 47 | 48 | $queryUnique = "SELECT DISTINCT nameOfComputer FROM backup_reports"; 49 | $resultUnique = mysqli_query($connection, $queryUnique); 50 | $numberOfUnique = mysqli_num_rows($resultUnique); 51 | 52 | $queryUnique24h = "SELECT DISTINCT nameOfComputer FROM backup_reports WHERE DATE(date) BETWEEN '$date24h' AND '$toDate'"; 53 | $resultUnique24h = mysqli_query($connection, $queryUnique24h); 54 | $numberOfUnique24h = mysqli_num_rows($resultUnique24h); 55 | 56 | 57 | $queryUnique7j = "SELECT DISTINCT nameOfComputer FROM backup_reports WHERE DATE(date) BETWEEN '$date7j' AND '$toDate'"; 58 | $resultUnique7j = mysqli_query($connection, $queryUnique7j); 59 | $numberOfUnique7j = mysqli_num_rows($resultUnique7j); 60 | 61 | // Part for the modal 62 | $queryListComp = "SELECT DISTINCT nameOfComputer FROM backup_reports"; 63 | $result = mysqli_query($connection, $queryListComp); 64 | $computerList = ''; 65 | while ($row = mysqli_fetch_assoc($result)) { 66 | $arrayComputerList[] = $row['nameOfComputer']; 67 | $computerList .= "
  • {$row['nameOfComputer']}
  • "; 68 | } 69 | 70 | $arrayComputerList24 = array(); 71 | 72 | $queryList24 = "SELECT DISTINCT nameOfComputer FROM backup_reports WHERE DATE(date) BETWEEN '$date24h' AND '$toDate'"; 73 | $result24 = mysqli_query($connection, $queryList24); 74 | $computerList24 = '';// This list is all computer that did theire backup in the last 24h 75 | // we have to do a difference between the list of all computer and the list of computer that did theire backup in the last 24h 76 | while ($row = mysqli_fetch_assoc($result24)) { 77 | $arrayComputerList24[] = $row['nameOfComputer']; 78 | } 79 | 80 | $arrayComputerList7 = array(); 81 | 82 | $queryList7 = "SELECT DISTINCT nameOfComputer FROM backup_reports WHERE DATE(date) BETWEEN '$date7j' AND '$toDate'"; 83 | $result7 = mysqli_query($connection, $queryList7); 84 | $computerList7 = ''; 85 | while ($row = mysqli_fetch_assoc($result7)) { 86 | $arrayComputerList7[] = $row['nameOfComputer']; 87 | } 88 | 89 | // Part for the % of backup 90 | $percent24h = round(($numberOfUnique24h / $numberOfUnique) * 100, 1); 91 | $percent7j = round(($numberOfUnique7j / $numberOfUnique) * 100, 1); 92 | 93 | //Diff 94 | $computerList24 = array_diff($arrayComputerList, $arrayComputerList24); 95 | $computerList7 = array_diff($arrayComputerList, $arrayComputerList7); 96 | 97 | 98 | //We roll back the array to a
  • list 99 | $computerList24 = array_reduce($computerList24, function ($carry, $item) { 100 | return $carry . "
  • $item
  • "; 101 | }, ''); 102 | $computerList7 = array_reduce($computerList7, function ($carry, $item) { 103 | return $carry . "
  • $item
  • "; 104 | }, ''); 105 | ?> 106 | 107 | 108 | 109 | 110 | 111 | Duplicati Monitor 112 | 113 | 114 | 115 | 116 |
    117 |

    Duplicati Monitor - Overview

    118 |
    119 |
    120 | 121 | 127 |
    128 |
    There is a total of  backups registered in the 129 | database 130 |
    131 |
    132 | 133 |
    134 |
    135 |
    136 |
    137 |
    138 |
    Unique saves
    139 |
    140 |
    141 | 142 |
    143 | 144 | 145 | 146 |
    147 |
    148 |
    149 | 150 |
    151 |
    152 | Saves in the last 24 hours. 153 | 154 |
    155 | 156 | 157 | 158 |
    159 |
    160 |
    161 | 162 |
    163 |
    164 | Saves in the last 7 days. 165 | 166 |
    167 | 168 | 169 | 170 |
    171 | 172 |
    173 |
    174 |
    175 |
    176 |
    177 |
    178 | 179 | 180 |
    181 |

    Here is the list with the names of the backups:

    182 |
    183 |
      184 | 185 |
    186 | 187 | 188 |
    189 | 190 |
    191 |

    Those computer did not made backups in the last 24 hours:

    192 |
    193 |
      194 | 195 |
    196 | 197 | 198 |
    199 | 200 |
    201 |

    Those computer did not made backups in the last 7 days:

    202 |
    203 |
      204 | 205 |
    206 | 207 | 208 |
    209 | 210 | 211 | 239 | 240 | 241 | 242 | --------------------------------------------------------------------------------
    Backup ID 35 | 36 | 37 | Backup Name 39 | 40 | Backup Date 42 | 43 | Backup Size 45 | 46 | Backup Duration 48 | 49 | Backup Result 51 | 52 | Details
    {$row['id']}{$row['nameOfComputer']}{$row['date']}{$row['sizeOfExaminedFiles']}{$row['duration']}{$row['operation']}Details