-
Script data recovery
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.
-
Re: Script data recovery
- According to the facilities --
* Safeguarding days on a medium pair
* Odd days backup on another media
* Backup and accumulation weekend archive on another media.
As against the storage time should be set! or increased depending on how the life of the media.
-
Re: Script data recovery
I discovered the Robocopy command, introduced in Windows Server 2003 Resource Kit Tools
My formula would be:
Code:
Robocopy e: \ monrepertoire d: \ monbackup / mir / s / purge / r: 0
This is the parameter "/ purge" which makes all the difference with my simple xcopy, it removes what is on the server is no longer on the client.
But since yesterday, I thought back to the thing. I thought it would be good if the data are deleted from the server if they are no longer on the client after a certain period. Because if a client destroys its data locally, and then opens a new session, the server will respond deletion!
Page generated in 1,714,008,750.05467 seconds with 10 queries