increase term backup history length
This commit is contained in:
parent
ea496cd517
commit
db66a3baad
|
|
@ -1,9 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -euo pipefail
|
# set -euo pipefail
|
||||||
|
|
||||||
# this should live in /mnt/media/plexsync
|
# this should live in /mnt/media/plexsync
|
||||||
|
|
||||||
FILENAME="plexdb_term_$(date -u +%FT%T).sqlite"
|
FILENAME="plexdb_term_$(date -u +%FT%T).sqlite"
|
||||||
sqlite3 /config/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/com.plexapp.plugins.library.db ".backup /mnt/media/plexsync/$FILENAME"
|
sqlite3 /config/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/com.plexapp.plugins.library.db ".backup /mnt/media/plexsync/$FILENAME"
|
||||||
|
|
||||||
ls -tp /mnt/media/plexsync/plexdb_15min* | tail -n +3 | xargs -I {} rm -- {}
|
ls -tp /mnt/media/plexsync/plexdb_15min* | tail -n +5 | xargs -I {} rm -- {}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue