hello friends
i need backup script. i will use with cobian backup shelude. this backup will be execute per 8 hours in day
(sorry... i dont know how i can close/shutdown later re-start Win-MySql... if you know that.. pls add to script)
my source directory = c:\PDKS\DB\
first target/backup path = e:\PDKS\
second target path = c:\Backup\PDKS\
rar execute path = C:\Program Files\WinRAR\rar.exe (sorry)
i need date time stamp before backup --Year ; Month(count january = 01 - april = 04 - agust = 09 - december = 12) ; Day (count 01,02,03....29-30-31) ; time (00:30:15; 23:12:59)
what i need?
i wanna copy all DB files from (c:\PDKS\DB\*.*) to (e:\PDKS\PDKS__%YEAR%_%Month%\PDKS__%year%_%month%_%date%_%hour:min:sec%\*.*)
if all files copyed to target directory... i need compressed file with target directory name.. example "PDKS__%year%_%month%_%date%__%hour:min:sec%.rar" (PDKS__2021_01_08__17:07:43.rar)
if db files compressed, must delete that directory from path
mean; i dont need this SUB directory (PDKS__%year%_%month%_%date%__%hour:min:sec%\) at e:\PDKS\PDKS__%YEAR%_%Month%\
if; first target path is down or protected for write, i need backup file at localpath... ( this "e:\" path is my NAS)
mean;
backup files must c:\Backup\PDKS\ with same directory name
c:\Backup\PDKS\PDKS__%YEAR%_%Month%\PDKS__%year%_%month%_%date%__%hour:min:sec%\*.*
and compressed file name must be "PDKS__%year%_%month%_%date%__%hour:min:sec%.rar" (PDKS__2021_01_08__17:07:43.rar)
next step must delete sub directory ; i need just compressed files at (c:\Backup\PDKS\PDKS__%YEAR%_%Month%\)
rar file compress status enough "classic-normal" type; i dont need password for rar file.. this is only backup file
could you help me?
thank you very much