The database server used by the company is backed up every day, before manually compressing and then copying one copy to another.
No matter what, you decide to use a script to automatically back up and copy
There is a lot of information on the Internet, Baidu a bit
Environment Introduction
Database backup files are stored under D:\beife\
A server with a network segment as a backup of compressed files
2. compressing documents
Install the WinRAR software first and determine the path, which you will need to configure in the system environment variables later
I will first map a network share folder of the storage server to disk L, then create a new TXT file, enter the following command
RAR A-DF-AGYYYY-MM-DD l:\ D:\oracle\bf\*.*
Files saved in. bat format
The meaning of the above command is to automatically compress the \oracle\bf\ file under the D disk and save it in the L packing directory, and then delete the source file after compression.
The compressed file is named 2016-xx-xx
Setup is required because the system cannot automatically recognize WinRAR commands
Right click on Computer click Properties > Advanced system settings > Environment variables
You can see path under administrator user variable, and if not, create a new installation path named path with a value of winrar
My installation path here is C:\Program Files\winrar, click Save to
3. Create a Scheduled task
Then open Task Scheduler
Create a new task with the name winrar
Then configure it as you want
Since our database files are automatically backed up 4:00 every day, I set a daily 7:00 to execute the bat file.
At this point, the automatic compression of the database files to the specified server folder is complete
Automatically compress backup database files to a specified server