From fe2596dc0e389c0496a384cc1893fddd4742ed37 Mon Sep 17 00:00:00 2001 From: JPVenson Date: Mon, 19 May 2025 03:39:04 +0300 Subject: Add Full system backup feature (#13945) --- .../SystemBackupService/IBackupService.cs | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 MediaBrowser.Controller/SystemBackupService/IBackupService.cs (limited to 'MediaBrowser.Controller/SystemBackupService/IBackupService.cs') diff --git a/MediaBrowser.Controller/SystemBackupService/IBackupService.cs b/MediaBrowser.Controller/SystemBackupService/IBackupService.cs new file mode 100644 index 000000000..0c586d811 --- /dev/null +++ b/MediaBrowser.Controller/SystemBackupService/IBackupService.cs @@ -0,0 +1,48 @@ +using System; +using System.IO; +using System.Threading.Tasks; +using MediaBrowser.Controller.SystemBackupService; + +namespace Jellyfin.Server.Implementations.SystemBackupService; + +/// +/// Defines an interface to restore and backup the jellyfin system. +/// +public interface IBackupService +{ + /// + /// Creates a new Backup zip file containing the current state of the application. + /// + /// The backup options. + /// A task. + Task CreateBackupAsync(BackupOptionsDto backupOptions); + + /// + /// Gets a list of backups that are available to be restored from. + /// + /// A list of backup paths. + Task EnumerateBackups(); + + /// + /// Gets a single backup manifest if the path defines a valid Jellyfin backup archive. + /// + /// The path to be loaded. + /// The containing backup manifest or null if not existing or compatiable. + Task GetBackupManifest(string archivePath); + + /// + /// Restores an backup zip file created by jellyfin. + /// + /// Path to the archive. + /// A Task. + /// Thrown when an invalid or missing file is specified. + /// Thrown when attempt to load an unsupported backup is made. + /// Thrown for errors during the restore. + Task RestoreBackupAsync(string archivePath); + + /// + /// Schedules a Restore and restarts the server. + /// + /// The path to the archive to restore from. + void ScheduleRestoreAndRestartServer(string archivePath); +} -- cgit v1.2.3