Hello everyone,
I was given the following directive: to write a script to automatically back up data on portable X posts.
In theory, I issued the first: each time a user, run a login script (via Active Directory) making a copy of all files in a given directory to a backup server.
Code:
net use z: \ \ server \ backup \% username%
xcopy c: \ data z: / e / h / y / k
will do.
If at each logon users ages 3 expect that all data is copied, it does not. He therefore suggested that a condition for retrieving data: only copied the files new or modified since the last time.
Here it goes again:
Code:
net use z: \ \ server \ backup \% username%
xcopy c: \ data z: / e / h / y / k / a
But if you think about it, I thought: if the user has at 1st January 1GB of data recovered, and then 3 months after he deleted the data locally and replaced it with 1GB of something else, the server will retain 2GB , which is not useful and could quickly overburden.
Therefore, how to have the files on the disk server are deleted if they are no longer on the client?
I do not know if there is such a command. Perhaps a "if". If yes, what would it?
Thank you in advance for your answers.
Bookmarks