Showing results 1 to 8 of 8

Thread: Automatic Backup

  1. #1
    Join Date
    11.04.2008
    Posts
    40

    Daumen hoch Automatic Backup

    Hi,

    Is there a way of automating a backup of projects and exporting them to another location when for example I close zenon development or periodically during runtime.

    Thanks

  2. #2
    Join Date
    30.05.2007
    Location
    Salzburg
    Posts
    879

    Default Re: Automatic Backup

    By now such a functionallity is not available in zenOn.

    With next generation of zenOn (version after 6.22) it will be possible to create project backups via VBA

    for example I close zenon development
    -> Within the Project_Inactive Event a project backup could be then processed....

    This event is executed on deactivating the project in the Runtime.
    A project is deactivated at the following actions:
    · Closing the Runtime
    · Reloading
    · Redundancy update


    or periodically during runtime
    -> I guess you are meaning the runtime of the zenOn Editor....
    -> This would be a little be more tricky... with the help of a timer or something like this....
    -> Due to the project is unloaded from the workspace when creating a project backup you might get in some troubles with such an automatism...

    Regards,
    Herbert

  3. #3
    Join Date
    30.05.2007
    Location
    Salzburg
    Posts
    879

    Default Re: Automatic Backup

    Ouuups.... there is a mistake in my previous post

    -> Within the Project_Inactive Event a project backup could be then processed....

    This event is executed on deactivating the project in the Runtime.
    A project is deactivated at the following actions:
    · Closing the Runtime
    · Reloading
    · Redundancy update
    -> this event is of course for the zenOn Runtime

    ZenWorkspace_Exit() is the equivalent event for the zenOn Editor....

  4. #4
    Join Date
    16.07.2014
    Location
    Zaporizhia
    Posts
    43

    Default Re: Automatic Backup

    Is there a new way to automate creating project backups? Zenon 7.11
    Or only through ZenWorkspace_Exit()?

  5. #5
    Join Date
    16.07.2014
    Location
    Zaporizhia
    Posts
    43

    Default Re: Automatic Backup

    Hi all!
    This weekends i have some time, and tried to realise automatic backup in Zenon Editor.
    I encountered with some problems:
    - When i put code in Private Sub ZenWorkspace_OnWorkspaceExit() backup doesn't makes. Dont know why.
    - I put code in ZenWorkspace_OnPreProjectUnload(ByVal obProject As IProject). When i close Zenon Editor, this simple code is running:
    b = Me.CreateProjectBackup("BOTVES", "D:\Project\Backupprj" & Date & ".zip", "", True)
    Backup is starting to make.....and....i always have an error (look at picture. Its in russian, in English it mean "zenon Editor has stopped working, Check online..., Close...., Debug the program"). Backup doesn't create

    What I`m doing wrong?
    Zenon Editor 7.11 SP0 Build12493 32Bit
    Windows 7 Professional SP1 32bit
    Attached Thumbnails Attached Thumbnails picture.png  
    Zenon EE 7.11 SP0 Build 12493.

  6. #6
    Join Date
    14.07.2010
    Posts
    46

    Daumen hoch Re: Automatic Backup

    Hello diemon,

    it is not possible to create a backup while terminating the zenon Editor.

    If you want to use a VBA macro for creating the backup you have to execute it manually (icon bar) or use the standard way (zenon tree -> Project backup)

    Best regards,
    Daniela.

  7. #7
    Join Date
    16.07.2014
    Location
    Zaporizhia
    Posts
    43

    Default Re: Automatic Backup

    Here is my version of creating backup and sending it via email:
    In VBA -> ZWorkspace -> Zenrt32 create very simple Sub
    Public Sub Create_backup()
     a = MsgBox("Create backup and send it via email?", vbOKCancel)
         If a = 1 Then b = Me.CreateProjectBackup("BOTVES", "D:\Project\BOTVES" & Date & ".zip", "", True)
         If b = True Then Shell "D:\Project\send_backup.bat"
    End Sub

    Then in Editor: Options -> Toolbars -> Macro list


    send_backup.bat:
    @ECHO OFF
    ::Directory with backups:
    SET BACKUPDIRECTORY=D:\Project
    set mailsender=mailsend1.17b14.exe  
    set smtpsender=example@mail.ru 
    set smtpsenderfullname=NAMEtest 
    set smtpserver=smtp.mail.ru 
    set smtpport=465 
    set smtpuser=example@mail.ru
    set smtppwd="Password_here" 
    set mailto=example@mail.ru
    ::mailsender = mailto mean that i send email to myself
    
    PUSHD %BACKUPDIRECTORY%
    FOR %%A in (*.zip) do CALL :Subroutine %%A
    POPD
    
    TITLE Mail has been send!
    ECHO Mail has been send!
    
    
    GOTO:EOF
    
    :Subroutine
    set BNAME=%1
    
    TITLE Sending %BNAME%
    ECHO Sending %BNAME%
    
    %mailsender% -smtp %smtpserver% -port %smtpport% -ssl -auth -user %smtpuser% -pass %smtppwd% -t %mailto% -f "%smtpsender%" -name "%smtpsenderfullname%" +cc +bc -v -q  -sub "backup" -M "Zenon backup" -attach %BNAME%
    forfiles.exe -m botves*.zip -c "cmd /c del @FILE"
    GOTO:EOF

    mailsend1.17b14.exe - freeware utility to send email
    forfiles.exe - utility in Win7/Server2008 to delete files.
    Attached Thumbnails Attached Thumbnails port.png  
    Zenon EE 7.11 SP0 Build 12493.

  8. #8
    Join Date
    28.09.2015
    Posts
    13

    Default Re: Automatic Backup

    it is any new way use it with addins?

Similar Threads

  1. error on restoring a project backup
    By markclemens in forum zenon Supervisor
    Replies: 3
    Last Post: 31st March 2012, 09:26
  2. Could not restore backup in the editor
    By jegloco in forum zenon Supervisor
    Replies: 1
    Last Post: 2nd February 2009, 10:49
  3. Backup database
    By matholton in forum zenon Supervisor
    Replies: 1
    Last Post: 17th October 2008, 13:49
  4. Replies: 0
    Last Post: 24th April 2008, 12:05

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •