mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-21 16:25:28 +03:00
Add declarative backups for migrations (#14135)
This commit is contained in:
@@ -129,6 +129,21 @@ public sealed class SqliteDatabaseProvider : IJellyfinDatabaseProvider
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task DeleteBackup(string key)
|
||||
{
|
||||
var backupFile = Path.Combine(_applicationPaths.DataPath, BackupFolderName, $"{key}_jellyfin.db");
|
||||
|
||||
if (!File.Exists(backupFile))
|
||||
{
|
||||
_logger.LogCritical("Tried to delete a backup that does not exist: {Key}", key);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
File.Delete(backupFile);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public async Task PurgeDatabase(JellyfinDbContext dbContext, IEnumerable<string>? tableNames)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user