Fozzie Bear
Active member
- Local time
- 11:06 AM
- Posts
- 32
- OS
- Windows 10 Home 22H2 (Build 19045.4291)
I’m reviewing my backup strategy of all my personal files. I have about 900Gb of family photos and videos which I want to maintain. Currently these sit on a PC which acts as a family network server. This has 8Tb of storage made up of several drives in mirror raid mode.
Local PCs have their Documents, Videos, and Music library’s redirected to a network share for each of these categories.
I use Robocopy to run a nightly backup of each of these network shares to an external1Tb eSata drive attached to the server. This external hard drive is the location for my OneDrive folder so anything copied into this folder is then synced to OneDrive.
However, I am now nearing my 1Tb OneDrive limit so want to thin out some of the files. My robocopy script just copies everything to the hard drive but over the years I have deleted files from the source as they are no longer required or more generally have renamed them so there are duplicates. The source therefore contains lots of files that I have decided I don’t need.
I don’t want to delete any of these files in case I delete a file in error which is then not noticed for a while. Using a robocopy mirror script will purge from the destination and consequently from OneDrive.
I would therefore like to run two backups separated by time. The first to an 8Tb drive on an always on NUC so I keep a full copy of everything. Then later a second backup using mirror to the 1Tb eSata drive on the server. This would purge all the deleted and renamed files uploaded to OneDrive but I will still have a full backup on the NUC.
Long intro sorry, but a few questions:-
1) Can you create two scripts within the same batch file separated by time or should I create a second batch file and run it at a separate time?
2) When specifying a network share is it better to use the machine name or IP address e.g. \\backup-Nuc\D\Videos or \\ipaddress\D\Videos
Here is my current batch file content:-
Robocopy "D:\Documents" "E:\Onedrive\Documents" *.* /E /COPYALL /XO /MT[:n] /LOG:"C:\Users\Admin\Desktop\documents.txt" /Z /R:3 /W:10
Robocopy "D:\Videos" "E:\Onedrive\Videos" *.* /E /COPYALL /XO /MT[:n] /LOG:"C:\Users\Admin\Desktop\videos.txt" /Z /R:3 /W:10
Robocopy "D:\Photos" "E:\Onedrive\Photos" *.* /E /COPYALL /XO /MT[:n] /LOG:"C:\Users\Admin\Desktop\photos.txt" /Z /R:3 /W:10
Robocopy "D:\Downloaded Photos" "E:\Downloaded Photos" *.* /E /COPYALL /XO /MT[:n] /LOG:"C:\Users\Admin\Desktop\Downloaded Photos.txt" /Z /R:3 /W:10
I need to change each the above scripts to copy to \\Backup-nuc\d\Videos or IP address as advised. I then need to run the same scripts with mirror and purge switches. Is this example correct for mirror:-
Robocopy "D:\Documents" "E:\Onedrive\Documents" *.* /E /MIR /Purge /XO /MT[:n] /LOG:"C:\Users\Admin\Desktop\documents.txt" /Z /R:3 /W:10
Its a long while since I created these scripts which took a lot of head scratching when they didn't initially work.
Many thanks
Local PCs have their Documents, Videos, and Music library’s redirected to a network share for each of these categories.
I use Robocopy to run a nightly backup of each of these network shares to an external1Tb eSata drive attached to the server. This external hard drive is the location for my OneDrive folder so anything copied into this folder is then synced to OneDrive.
However, I am now nearing my 1Tb OneDrive limit so want to thin out some of the files. My robocopy script just copies everything to the hard drive but over the years I have deleted files from the source as they are no longer required or more generally have renamed them so there are duplicates. The source therefore contains lots of files that I have decided I don’t need.
I don’t want to delete any of these files in case I delete a file in error which is then not noticed for a while. Using a robocopy mirror script will purge from the destination and consequently from OneDrive.
I would therefore like to run two backups separated by time. The first to an 8Tb drive on an always on NUC so I keep a full copy of everything. Then later a second backup using mirror to the 1Tb eSata drive on the server. This would purge all the deleted and renamed files uploaded to OneDrive but I will still have a full backup on the NUC.
Long intro sorry, but a few questions:-
1) Can you create two scripts within the same batch file separated by time or should I create a second batch file and run it at a separate time?
2) When specifying a network share is it better to use the machine name or IP address e.g. \\backup-Nuc\D\Videos or \\ipaddress\D\Videos
Here is my current batch file content:-
Robocopy "D:\Documents" "E:\Onedrive\Documents" *.* /E /COPYALL /XO /MT[:n] /LOG:"C:\Users\Admin\Desktop\documents.txt" /Z /R:3 /W:10
Robocopy "D:\Videos" "E:\Onedrive\Videos" *.* /E /COPYALL /XO /MT[:n] /LOG:"C:\Users\Admin\Desktop\videos.txt" /Z /R:3 /W:10
Robocopy "D:\Photos" "E:\Onedrive\Photos" *.* /E /COPYALL /XO /MT[:n] /LOG:"C:\Users\Admin\Desktop\photos.txt" /Z /R:3 /W:10
Robocopy "D:\Downloaded Photos" "E:\Downloaded Photos" *.* /E /COPYALL /XO /MT[:n] /LOG:"C:\Users\Admin\Desktop\Downloaded Photos.txt" /Z /R:3 /W:10
I need to change each the above scripts to copy to \\Backup-nuc\d\Videos or IP address as advised. I then need to run the same scripts with mirror and purge switches. Is this example correct for mirror:-
Robocopy "D:\Documents" "E:\Onedrive\Documents" *.* /E /MIR /Purge /XO /MT[:n] /LOG:"C:\Users\Admin\Desktop\documents.txt" /Z /R:3 /W:10
Its a long while since I created these scripts which took a lot of head scratching when they didn't initially work.
Many thanks
- Windows Build/Version
- Desktops Win11 23H2, Server Win10 22H2
My Computer
System One
-
- OS
- Windows 10 Home 22H2 (Build 19045.4291)
- Computer type
- PC/Desktop
- Manufacturer/Model
- Gigabyte B85M-D3H
- CPU
- Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz (8 CPUs)
- Motherboard
- Gigabyte B85M-D3H
- Memory
- 16.0 Gb
- Graphics Card(s)
- Integrated Intel(R) HD Graphics 4600
- Sound Card
- Intel Digital Audio (S/PDIF) (High Definition Audio Device)
- Monitor(s) Displays
- BenQ G2420HD
- Screen Resolution
- 1920x1080
- Hard Drives
- Primary: Samsung SSD 840 EVO 250GB Secondary 1: Seagate ST31000524AS (NTFS) Secondary 2: Seagate ST1000DM005 HD103SJ(exFat)
- PSU
- OCZ 550w
- Case
- LianLi
- Cooling
- ThermoLab Trinity
- Keyboard
- Dell (Logitech) Wireless keyboard
- Mouse
- Dell (Logitech) Wireless Mouse
- Internet Speed
- 100mb FTTP




