Skip to content

Commit fbcf818

Browse files
committed
Adding plex backup syncer
0 parents  commit fbcf818

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

Plex Backup Sync.xml

3.69 KB
Binary file not shown.

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# PlexSyncBackup

plex-drive-mirror.bat

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
@ECHO OFF
2+
3+
:: Syncs an entire (Plex media) drive to a backup drive
4+
:: Make sure that any USB drives are explicitly assigned drive letters so after reconnection this script wont target an incorrect path
5+
6+
:: Ensure sync log directory exists
7+
IF NOT EXIST "C:\sync_logs" MKDIR C:\sync_logs
8+
9+
:: Sync each media drive to its backup drive
10+
CALL :SYNC_DIRECTORY "Anime" "E:\" "R:\"
11+
CALL :SYNC_DIRECTORY "Movies" "F:\" "S:\"
12+
CALL :SYNC_DIRECTORY "Television" "G:\" "T:\"
13+
14+
:: Exit from main logic
15+
EXIT /B %ERRORLEVEL%
16+
17+
:: Function that syncs a source directory to a destination backup directory, ignoring any root directory prefixed with "_temp".
18+
:: (arguments: Name, SourceDirectory, DestinationDirectory)
19+
:SYNC_DIRECTORY
20+
@ECHO Starting sync for %~1 (%date% %time%)... >> C:\sync_logs\log.txt
21+
ROBOCOPY %~2 %~3 /MIR /XJD /MT:4 /R:10 /W:60 /XA:SHT /log+:C:\sync_logs\log.txt /XD _temp* $* "System Volume Information*" /XF *.dat *.sys *.db *.log
22+
EXIT /B 0

0 commit comments

Comments
 (0)