Feature/manual db backup (#437)
Added: New button in manage server to manually create a backup of DB (Fixes Add on demand DB backup from Admin Dashboard #322)
This commit is contained in:
parent
66f40656dd
commit
3dbe7eec1f
5 changed files with 43 additions and 1 deletions
|
@ -35,6 +35,10 @@ namespace API.Controllers
|
|||
_cacheService = cacheService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Attempts to Restart the server. Does not work, will shutdown the instance.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost("restart")]
|
||||
public ActionResult RestartServer()
|
||||
{
|
||||
|
@ -44,6 +48,10 @@ namespace API.Controllers
|
|||
return Ok();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Performs an ad-hoc cleanup of Cache
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost("clear-cache")]
|
||||
public ActionResult ClearCache()
|
||||
{
|
||||
|
@ -53,6 +61,19 @@ namespace API.Controllers
|
|||
return Ok();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Performs an ad-hoc backup of the Database
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost("backup-db")]
|
||||
public ActionResult BackupDatabase()
|
||||
{
|
||||
_logger.LogInformation("{UserName} is backing up database of server from admin dashboard", User.GetUsername());
|
||||
_backupService.BackupDatabase();
|
||||
|
||||
return Ok();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns non-sensitive information about the current system
|
||||
/// </summary>
|
||||
|
@ -79,5 +100,6 @@ namespace API.Controllers
|
|||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue