Простой скрипт для создания резервных копий для Windows

Собственно сам скрипт ниже. Для его работы должны быть установлены архиватор 7-zip и утилита forfiles. Скрипт представляет из себя bat(cmd) файл, который архивирует указанный каталог, и скидывает его в сетевое хранилище. Время хранения копии в данном примере 10 дней.

net use Y: /delete /y
net use Y: \\192.168.0.250\backups\1c backup1c /USER:backup1c
IF EXIST Y:\backup (GOTO CREATE_BACKUP) ELSE (GOTO ERROR)
:CREATE_BACKUP
set Backup=Y:
Y:
%Backup%
for /d %%z in (*) do f:\forfiles.exe /p %%z /d -10 /m *.7z /c "cmd /c del /f /a @file"
"f:\Program Files\7-Zip\7z.exe" a -t7z Y:\backup\8\%DATE%.7z  E:\Buhgalteria\1C\1c8
F:
NET USE Y: /delete /y
:ERROR
exit

Собственно сам скрипт ниже. Для его работы должны быть установлены архиватор 7-zip и утилита forfiles. Скрипт представляет из себя bat(cmd) файл, который архивирует указанный каталог, и скидывает его в сетевое хранилище. Время хранения копии в данном примере 10 дней.

net use Y: /delete /y
net use Y: \\192.168.0.250\backups\1c backup1c /USER:backup1c
IF EXIST Y:\backup (GOTO CREATE_BACKUP) ELSE (GOTO ERROR)
:CREATE_BACKUP
set Backup=Y:
Y:
%Backup%
for /d %%z in (*) do f:\forfiles.exe /p %%z /d -10 /m *.7z /c "cmd /c del /f /a @file"
"f:\Program Files\7-Zip\7z.exe" a -t7z Y:\backup\8\%DATE%.7z  E:\Buhgalteria\1C\1c8
F:
NET USE Y: /delete /y
:ERROR
exit

31 комментарий к “Простой скрипт для создания резервных копий для Windows

  1. After research a few of the post on your site currently, as well as I truly like your method of blog writing. I bookmarked it to my book mark internet site listing and also will be inspecting back soon. Pls take a look at my internet site also as well as let me recognize what you believe.

  2. After research study a few of the post on your internet site currently, as well as I absolutely like your method of blogging. I bookmarked it to my bookmark web site checklist and will certainly be inspecting back quickly. Pls check out my web site too as well as let me recognize what you assume.

  3. The next time I review a blog, I hope that it doesn’t dissatisfy me as long as this one. I mean, I know it was my selection to review, yet I actually believed youd have something intriguing to claim. All I listen to is a bunch of whining regarding something that you might repair if you werent as well hectic looking for interest.

  4. Just wish to say your article is as amazing. The clarity on your publish is simply cool and that i could assume you’re knowledgeable on this subject.
    Well along with your permission let me to grab your feed to stay
    up to date with imminent post. Thanks 1,000,000 and please
    carry on the gratifying work. cheap flights 31muvXS

  5. Hmm it looks like your blog ate my first comment
    (it was super long) so I guess I’ll just sum it up what I submitted and say, I’m thoroughly enjoying your blog.
    I too am an aspiring blog writer but I’m still new to
    everything. Do you have any tips for rookie blog writers?
    I’d genuinely appreciate it.

  6. The following time I review a blog site, I hope that it doesn’t disappoint me as long as this one. I indicate, I know it was my selection to read, yet I actually believed youd have something fascinating to claim. All I listen to is a lot of yawping regarding something that you could deal with if you werent too busy looking for focus.

  7. Woah! I’m really loving the template/theme of this blog.

    It’s simple, yet effective. A lot of times it’s very difficult to get that “perfect balance” between superb usability and appearance.
    I must say that you’ve done a awesome job with this.
    Also, the blog loads extremely quick for me on Chrome. Excellent Blog!

  8. I?m pleased, I must say. Really rarely do I come across a blog site that?s both instructional and also enjoyable, and let me inform you, you have actually struck the nail on the head. Your concept is outstanding; the concern is something that inadequate individuals are speaking wisely about. I am very happy that I came across this in my search for something relating to this.

  9. It’s an superb post and that i completely accept that which you said. I’m attempting to set up the Rss feed however i ‘m definitely not really pc well written. Might somebody let me know how allow me to set up the Feed so I get informed of any brand new post? You need to explain it within an straightforward method as I am obtaining old.

  10. A remarkable discussion merits a comment. I feel that you need to write much more about this subject, it may well not be regarded as a taboo issue however normally people are inadequate to speak on such topics. To another. Adios for now

  11. I?m satisfied, I need to say. Truly rarely do I encounter a blog that?s both instructional and enjoyable, and let me tell you, you have hit the nail on the head. Your concept is superior; the concern is something that not nearly enough individuals are talking intelligently around. I am extremely satisfied that I came across this in my look for something relating to this.

Оставить ответ к where can i get cbd oil in michigan Отменить ответ

Ваш адрес email не будет опубликован. Обязательные поля помечены *