GPO: User Backup To File Share
Description:
This is a quick user backup solution for users on a domain. We needed to setup a backup for users over the network that would backup their documents, favorites, and desktop.
NOTE: We only have like 80 users on our domain so YMMV. If you have a large user base this is not suggested.
###
-
Create this user logon script batch file
1 2 3 4 5
cd c:\windows\system32\ mkdir c:\users\%username%\Documents\IT robocopy C:\Users\%username%\Documents \\fileservername\userbackups\%username%\Documents /E /log:c:\users\%username%\Documents\IT\robo.log robocopy C:\Users\%username%\Desktop \\fileservername\userbackups\%username%\Desktop /E /log:c:\users\%username%\Documents\IT\robo.log robocopy C:\Users\%username%\Favorites \\fileservername\userbackups\%username%\Favorites /E /log:c:\users\%username%\Documents\IT\robo.log
- What it does: This script backs up all the files in those locations. If the user deletes them, they still stay on the fileserver.
-
Created a new GPO at the OU container for all users (Domain.com\CorporateUsers)
-
Edited the GPO, went to User Configuration\Policies\Windows Settings\Scripts(Logon/Logoff) and pointed to the script.
- Located at: \domain.com\SysVol\domain.com\Policies{437B28BF-AEBB-45A6-B092-D65E463D5A95}\User\Scripts\Logon
-
Run => cmd => gpupdate on the server and on my computer.
Maintenance:
-
When the user logs in for the first time, the folder will be created in the share automatically.
-
We then go into the share and edit the permissions for that folder:
- Disable inheritance and convert to explicit permissions.
- Remove all users except that user and administrator.
-
After an employee leaves, we move their folder over to another after x amount of days.
Comments