mirror of
https://github.com/nicotsx/ironmount.git
synced 2025-12-10 12:10:51 +01:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
70df79079f | ||
|
|
f1096220dd |
@@ -6,7 +6,7 @@
|
|||||||
</a>
|
</a>
|
||||||
<br />
|
<br />
|
||||||
<figure>
|
<figure>
|
||||||
<img src="https://github.com/nicotsx/zerobyte/blob/main/screenshots/backup-details.png?raw=true" alt="Demo" />
|
<img src="https://github.com/nicotsx/zerobyte/blob/main/screenshots/backup-details.webp?raw=true" alt="Demo" />
|
||||||
<figcaption>
|
<figcaption>
|
||||||
<p align="center">
|
<p align="center">
|
||||||
Backup management with scheduling and monitoring
|
Backup management with scheduling and monitoring
|
||||||
|
|||||||
@@ -238,6 +238,7 @@ const executeBackup = async (scheduleId: number, manual = false) => {
|
|||||||
|
|
||||||
await restic.backup(repository.config, volumePath, {
|
await restic.backup(repository.config, volumePath, {
|
||||||
...backupOptions,
|
...backupOptions,
|
||||||
|
compressionMode: repository.compressionMode ?? "auto",
|
||||||
onProgress: (progress) => {
|
onProgress: (progress) => {
|
||||||
serverEvents.emit("backup:progress", {
|
serverEvents.emit("backup:progress", {
|
||||||
scheduleId,
|
scheduleId,
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import { logger } from "./logger";
|
|||||||
import { cryptoUtils } from "./crypto";
|
import { cryptoUtils } from "./crypto";
|
||||||
import type { RetentionPolicy } from "../modules/backups/backups.dto";
|
import type { RetentionPolicy } from "../modules/backups/backups.dto";
|
||||||
import { safeSpawn } from "./spawn";
|
import { safeSpawn } from "./spawn";
|
||||||
import type { RepositoryConfig } from "~/schemas/restic";
|
import type { CompressionMode, RepositoryConfig } from "~/schemas/restic";
|
||||||
|
|
||||||
const backupOutputSchema = type({
|
const backupOutputSchema = type({
|
||||||
message_type: "'summary'",
|
message_type: "'summary'",
|
||||||
@@ -234,6 +234,7 @@ const backup = async (
|
|||||||
exclude?: string[];
|
exclude?: string[];
|
||||||
include?: string[];
|
include?: string[];
|
||||||
tags?: string[];
|
tags?: string[];
|
||||||
|
compressionMode?: CompressionMode;
|
||||||
signal?: AbortSignal;
|
signal?: AbortSignal;
|
||||||
onProgress?: (progress: BackupProgress) => void;
|
onProgress?: (progress: BackupProgress) => void;
|
||||||
},
|
},
|
||||||
@@ -241,7 +242,14 @@ const backup = async (
|
|||||||
const repoUrl = buildRepoUrl(config);
|
const repoUrl = buildRepoUrl(config);
|
||||||
const env = await buildEnv(config);
|
const env = await buildEnv(config);
|
||||||
|
|
||||||
const args: string[] = ["--repo", repoUrl, "backup", "--one-file-system"];
|
const args: string[] = [
|
||||||
|
"--repo",
|
||||||
|
repoUrl,
|
||||||
|
"backup",
|
||||||
|
"--one-file-system",
|
||||||
|
"--compression",
|
||||||
|
options?.compressionMode ?? "auto",
|
||||||
|
];
|
||||||
|
|
||||||
if (options?.tags && options.tags.length > 0) {
|
if (options?.tags && options.tags.length > 0) {
|
||||||
for (const tag of options.tags) {
|
for (const tag of options.tags) {
|
||||||
@@ -291,6 +299,7 @@ const backup = async (
|
|||||||
|
|
||||||
let stdout = "";
|
let stdout = "";
|
||||||
|
|
||||||
|
logger.debug(`Executing: restic ${args.join(" ")}`);
|
||||||
const res = await safeSpawn({
|
const res = await safeSpawn({
|
||||||
command: "restic",
|
command: "restic",
|
||||||
args,
|
args,
|
||||||
|
|||||||
BIN
screenshots/backup-details.webp
Normal file
BIN
screenshots/backup-details.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 86 KiB |
Reference in New Issue
Block a user