Forum Discussion

knoxvegas's avatar
knoxvegas
Level 4
17 years ago
Solved

Setting the backup mode with the pre and post script usning BrightStor Arcserve

I need help setting the backup with a pre and post script when running backups with BrightStor Arcserve.  Below are my batch files:

Pre Script
Powershell.exe -psconsolefile "E:\Program Files\Enterprise Vault\evshell.psc1" set-IndexLocationBackupMode evserv
Powershell.exe -psconsolefile "E:\Program Files\Enterprise Vault\evshell.psc1" set-vaultstorebackupmode -name 'Vault Store Group' -evservername evserv -evobjecttype 'vaultstoregroup'

Post Script

Powershell.exe -psconsolefile "E:\Program Files\Enterprise Vault\evshell.psc1" clear-IndexLocationBackupMode evserv
Powershell.exe -psconsolefile "E:\Program Files\Enterprise Vault\evshell.psc1" clear-vaultstorebackupmode -name ' Vault Store Group' -evservername evserv -evobjecttype 'vaultstoregroup'

The problem I'm having is that it's not executing the script.  It keeps failing.  I need some guidance on how I can get the script to execute on my evault servers when running backup jobs from my backup server.  Thanks.

Thanks,
Sunshine
  • I created a batch file that executed PSexec as below (the reason I had to do this is because Arcserve runst pre/post scripts locally and not remotely):

    C:\EnterpriseVault\psexec.exe \\evserv01 cmd /c "echo . | C:\EnterpriseVault\pre.bat"

    Psexec then executes a batch file that I have stored on my vault servers at this location C:\EnterpriseVault\pre.bat.  The batch files look like this:

    pre.bat
    Powershell.exe -psconsolefile "E:\Program Files\Enterprise Vault\evshell.psc1" set-IndexLocationBackupMode evserv
    Powershell.exe -psconsolefile "E:\Program Files\Enterprise Vault\evshell.psc1" set-vaultstorebackupmode -name 'Vault Store Group' -evservername evserv -evobjecttype 'vaultstoregroup'
    exit

    post.bat

    Powershell.exe -psconsolefile "E:\Program Files\Enterprise Vault\evshell.psc1" clear-IndexLocationBackupMode evserv
    Powershell.exe -psconsolefile "E:\Program Files\Enterprise Vault\evshell.psc1" clear-vaultstorebackupmode -name ' Vault Store Group' -evservername evserv -evobjecttype 'vaultstoregroup'


    Everthing seems to work great at the moment.  Thanks for everyone's help.

    Sunshine

10 Replies

  • Hey Wayne,

    When I execute it on the evault server it will run correctly.

  •  You might also find that you need to run the scripts as the Vault Service Account.  Most cases I have come across with the PS scripts not running is because the Backup or the agents used to backup remote computers did not have permissions in EV.

    So you can either use the vautl service account to run the backups - or you can add the appropriate permissions to the backup account in EV using Roles Based Administration.
  • Add some logging to your pre and posts, and also pipe the output from the ps1 files to a log.  This will tell you if the backup software is kicking the scripts off and also where the scripts are failing.

    --wayne
  • The scripts I'm actuall using are batch files.  Can this be the reason?  I'm also using the service account. 
  •  Again I am going to ask - because if the scripts worked whilst logged into the EV server as the Vault service account - then what account are you using to do the Backups?

    Also when you run batch scripts with arcserve - do they run locally from the Backup server or are they run remotely on the EV server?  I ask, because I know Backup Exec has both these options.
    If you can only run them locally on the Arcserve backup server - you may need to look at scheduling tools that will run the scripts before a backup starts and then after the backup finishes.
  • KNOXVEGAS,

    What you need to do is create a domain account which you will use as a service account (e.g SVC_vaultbackup). Add this account to the local admins group on each of your vault servers.

    In Arcserve you need to configure your backup jobs to use this service account to perform the backups. Also configure the pre and post sections of the backup job to call the necessary pre and post scripts files to perform the mode changes

    This will then use the SVC_vaultbackup account to run the jobs and at the same time it will use the account to run the pre and post scripts
  • I created a batch file that executed PSexec as below (the reason I had to do this is because Arcserve runst pre/post scripts locally and not remotely):

    C:\EnterpriseVault\psexec.exe \\evserv01 cmd /c "echo . | C:\EnterpriseVault\pre.bat"

    Psexec then executes a batch file that I have stored on my vault servers at this location C:\EnterpriseVault\pre.bat.  The batch files look like this:

    pre.bat
    Powershell.exe -psconsolefile "E:\Program Files\Enterprise Vault\evshell.psc1" set-IndexLocationBackupMode evserv
    Powershell.exe -psconsolefile "E:\Program Files\Enterprise Vault\evshell.psc1" set-vaultstorebackupmode -name 'Vault Store Group' -evservername evserv -evobjecttype 'vaultstoregroup'
    exit

    post.bat

    Powershell.exe -psconsolefile "E:\Program Files\Enterprise Vault\evshell.psc1" clear-IndexLocationBackupMode evserv
    Powershell.exe -psconsolefile "E:\Program Files\Enterprise Vault\evshell.psc1" clear-vaultstorebackupmode -name ' Vault Store Group' -evservername evserv -evobjecttype 'vaultstoregroup'


    Everthing seems to work great at the moment.  Thanks for everyone's help.

    Sunshine
  • Don't forget to use -accepteula switch with psexec or it will just be in a waiting state:

    C:\EnterpriseVault\psexec.exe -accepteula \\evserv01 cmd /c "echo . | C:\EnterpriseVault\pre.bat"