Can't get backup pre or post scripts working quite right

OK, really strange issue and I have done some looking at other posts already as this is a common issue, but my symptoms are quite strange. (EV11)

  • Created batch files that create archive bit files and calls powershell to set / unset backup mode on the store and index.
    • Pretty standard stuff
  • Running scripts on the EV server as the EV user works OK
  • Running scripts on the EV server as the Backup SV account does not work

However, it says it does if you look at the command run...

The .TXT file just sits there, not changing to OLD.

The .TXT / .OLD files go fine in terms of deletion / creation in the batch, but after setting and unsetting backup mode, nothing changes, those files do not process and nothing gets set as backed up. It's like backup mode is not clearing and then processing the archive bit file (however, it works as the EV account).

The Backup SV account is a local admin of the EV 11 server and also has the role "Power admin" or whatever it's called.

The script is in the screen shot as I cannot copy paste and need to redact - also, this shows it saying it was successful... but it's not. ignorearchivebittrigger.exe file still exists.

Any ideas? Not sure how it can say it successfully set and unset backup mode without really doing it.

Thanks

James

 

 

 

Tags (3)
2 Solutions

Accepted Solutions
Accepted Solution!

Re: Can't get backup pre or post scripts working quite right

Accepted Solution!

Re: Can't get backup pre or post scripts working quite right

+1 for Alan. To 'fix', clear backup mode on the EV site (rightclick site, clear backup mode for indexes, and for stores. That sets the entry back to 0

Regards. Gertjan

View solution in original post

13 Replies

Re: Can't get backup pre or post scripts working quite right

Hello James,

The file needs to be called IgnoreArchiveBitTrigger.txt (not .exe, might be typo?).

You need to make sure that the triggerfile you create is written BEFORE backupmode is cleared. So, set backup mode, create triggerfile, clear backup mode. It also is necessary that the triggerfile has the current date/time. If you copy a file, it might have a wrong date. The date/time tell EV to consider everything before that date/time to be backedup.

I assume you set the partitions to use the triggerfile? (obvious, but easily forgotten).

Test: Set backup mode on a Vault Store. Create the triggerfile manually. Clear backup mode. Check the location where the triggerfile is, do you see an .old now?

Make sure the triggerfile is in the correct location. It might be you need to move it a folder up (or down) to be effective.

Regards. Gertjan
Accepted Solution!

Re: Can't get backup pre or post scripts working quite right

Accepted Solution!

Re: Can't get backup pre or post scripts working quite right

+1 for Alan. To 'fix', clear backup mode on the EV site (rightclick site, clear backup mode for indexes, and for stores. That sets the entry back to 0

Regards. Gertjan

View solution in original post

Re: Can't get backup pre or post scripts working quite right

Hi guys,

Thanks for input.

I did mean TXT, just a typo on here.

As I said on the 1st post, running the exact same script on the EV server...

- The script works as the EV user. Perfect.

- The script says it works as the Backup user, but it does not process the "ignore" file (it stays as .txt - does not go to old).

It must be some kind or permission thing, surely?

Re: Can't get backup pre or post scripts working quite right

Looking at Alan's post, I see the backup count can be higher than 1... therefore I ran the POST script a bunch of times, to clear clear clear... backup mode.

No joy.

The ignore file is still sitting as a .TXT file and there are still many files "awaiting backup".

Again, this exact script will work if I run it as the EV user.

Thanks

Re: Can't get backup pre or post scripts working quite right

Have you tried to create a file as Backup User? in the directory of the textfile?

 

Re: Can't get backup pre or post scripts working quite right

I assume you mean the .TXT file?

If so, then yes, that part of the script works OK. The old file is deleted, the .TXT is created OK.

Just when it says it "Successfully cleared backup state", the .TXT file just stays there.

Again, if I run the exact same batch file as the EV user, it works fine.

Re: Can't get backup pre or post scripts working quite right

Yeah, the problem is 100% that as the backup user, it is saying that it is clearing the backup mode, but it is 100% NOT clearing it.

Clearing it manually works and processes the .TXT file and it becomes a .OLD file.

So my backup user is missing some EV rights.

It's a full admin of the server.

Auth mgr: Backup Admin, Power Admin, Storage Admin, Index Admin roles.

Restarted the services after doing the Auth manager bit.

I must be missing something, I bet it's simple, but I do not know what it is.

Re: Can't get backup pre or post scripts working quite right

Have you tried adding it to the local admins group?

Re: Can't get backup pre or post scripts working quite right

can you logon to the EV server with the backup admin account, and run the commands as that account? You probably then see errors.. Something in the ev eventlog?

Regards. Gertjan
Highlighted

Re: Can't get backup pre or post scripts working quite right

Is this a new vault store partition?  Are you certain the vault store partition is set to use a trigger file and not the archive bit (default)?

Re: Can't get backup pre or post scripts working quite right

In answer to the last 3 questions.

Yes, local admins definitley.

Have ran it locally on the server, will check the logs for clues.

Stores are all fine, as the exact same script works as the EV user. If script or store settings were wrong then the same script would also fail as the EV user.

Will look for clues in the logs today, however, on screen, it says successful as per the screenshot.

Re: Can't get backup pre or post scripts working quite right

Well, that's odd.

I have made no changes since before, but when I went to do some more work on this today, I noticed that it is now working.

I had already set the permissions (both the EV role and server admin) and the scripts were good, services had been restarted.

The only thing I did last was manually set and unset backup mode to process the .TXT .> .OLD file. That was the last action... since then, it looks like it is working. However, it was NOT working the day after I did this... as this was advised earlier, I tried it, but then running the script as the other user was still not working... however, this was the last action and it is now working, a few days later.

I don't get it, but I am happy it is working at least.

Thanks for your assistance everyone.