Backup manager to only zip specific directories in config #89

This commit is contained in:
advplyr 2021-10-14 19:22:59 -05:00
parent cd6e99b4c3
commit 315592efe5
3 changed files with 12 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{
"name": "audiobookshelf-client",
"version": "1.4.7",
"version": "1.4.8",
"description": "Audiobook manager and player",
"main": "index.js",
"scripts": {

View File

@ -1,6 +1,6 @@
{
"name": "audiobookshelf",
"version": "1.4.7",
"version": "1.4.8",
"description": "Self-hosted audiobook server for managing and playing audiobooks",
"main": "index.js",
"scripts": {

View File

@ -307,7 +307,16 @@ class BackupManager {
// pipe archive data to the file
archive.pipe(output)
archive.directory(configPath, 'config')
var audiobooksDbDir = Path.join(configPath, 'audiobooks')
var librariesDbDir = Path.join(configPath, 'libraries')
var settingsDbDir = Path.join(configPath, 'settings')
var usersDbDir = Path.join(configPath, 'users')
archive.directory(audiobooksDbDir, 'config/audiobooks')
archive.directory(librariesDbDir, 'config/libraries')
archive.directory(settingsDbDir, 'config/settings')
archive.directory(usersDbDir, 'config/users')
if (metadataBooksPath) {
Logger.debug(`[BackupManager] Backing up Metadata Books "${metadataBooksPath}"`)
archive.directory(metadataBooksPath, 'metadata-books')