0 Replies Latest reply on Jul 16, 2013 2:49 PM by great98

    Automatic Offline Full Backup Plan: CQ5 Installed As a Service

    great98 Level 1

      I have designed an Automatic Offline Full Backup Plan for CQ5 Installed As a Service. I welcome your comments.

       

      Do you have any better way (scripts)?

       

      Offline Full Backup Scripts for Author

       

       

      :: offlineAuthorBackUp_CQ5AsService.bat


      :: Stop CQ5 service

      chdir /D %~dp0

      net stop cq5

       

       

      ::copy all files and folders to the destination

       

       

      mkdir h:\cq5backup\offline\author\backup

       

      ::robocopy only copies the updated files, so it is very quickly

       

      c:

      robocopy /MIR c:\cq5\author h:\cq5backup\offline\author\backup

       

       

      :: Start CQ5 service

      net start cq5

       

       

      ::Zip the backup with 7z.exe

       

       

      h:

      cd h:\cq5backup\offline\author

      7z a -y -tzip offlineAuthorBackup_%date:~4,2%%date:~7,2%.zip h:\cq5backup\offline\author\backup