Commit 201fcdf 1 parent 73a65b7 commit 201fcdf Copy full SHA for 201fcdf
File tree 2 files changed +9
-9
lines changed
2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 1
1
# PlexSyncBackup
2
2
3
3
### Directions
4
- 1 . Modify plex-drive-mirror.bat to configure your custom drive syncs using: "CALL : SYNC_DIRECTORY "
4
+ 1 . Modify plex-drive-mirror.bat to configure your custom drive syncs using: "CALL : SYNC_DRIVE "
5
5
2 . Import the task plex-sync-backup-task.xml into Windows Task Scheduler and change as needed
Original file line number Diff line number Diff line change 4
4
:: Make sure that any USB drives are explicitly assigned drive letters so after reconnection this script wont target an incorrect path
5
5
6
6
:: Ensure sync log directory exists
7
- IF NOT EXIST " C:\sync_logs " MKDIR C:\sync_logs
7
+ IF NOT EXIST " C:\plex_sync_logs " MKDIR C:\plex_sync_logs
8
8
9
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:\"
10
+ CALL :SYNC_DRIVE " Anime" " E:\" " R:\"
11
+ CALL :SYNC_DRIVE " Movies" " F:\" " S:\"
12
+ CALL :SYNC_DRIVE " Television" " G:\" " T:\"
13
13
14
14
:: Exit from main logic
15
15
EXIT /B %ERRORLEVEL%
16
16
17
- :: Function that syncs a source directory to a destination backup directory , ignoring any root directory prefixed with "_temp".
17
+ :: Function that syncs a source drive to a destination backup drive , ignoring any root directories prefixed with "_temp".
18
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
19
+ :SYNC_DRIVE
20
+ @ ECHO Starting sync for %~1 (%date% %time% )... >> C:\plex_sync_logs\ %~1 %- log.txt
21
+ ROBOCOPY %~2 %~3 /MIR /XJD /MT:4 /R:10 /W:60 /XA:SHT /log+:C:\plex_sync_logs\ %~1 %- log.txt /XD _temp* $* " System Volume Information*" /XF *.dat *.sys *.db *.log
22
22
EXIT /B 0
You can’t perform that action at this time.
0 commit comments