Comprehensive data protection for all workloads
Post Reply
adlois
Novice
Posts: 7
Liked: never
Joined: Jan 03, 2019 3:35 pm
Contact:

Does not run Pre-job scripts

Post by adlois »

Hi,

Support case ID: 03302160

The execution of the .bat scripts in "Previous work" does not work correctly, according to the registry. The execution is correct but nothing happens in the actual results. It is a script to remove content from the repository only.

After a multitude of tests on this case. It has been concluded that Veeam can not perform data loan tasks in the repository where the job is running.

This does not make sense, since if there is an option to execute scripts in previous tasks, the logical thing is to execute the script and then analyze the repository where to write the backup copies.

Thanks,
PTide
Product Manager
Posts: 6408
Liked: 724 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Does not run Pre-job scripts

Post by PTide »

Hi,

Would you provide more details on what you are trying to achieve? It seems that you want the pre-job script to clean-up some space on the repository that is used by the very same job the script belongs to, which makes me wonder why do you need to perform such a cleanup in the first place?

Thanks!
adlois
Novice
Posts: 7
Liked: never
Joined: Jan 03, 2019 3:35 pm
Contact:

Re: Does not run Pre-job scripts

Post by adlois »

Hi @PTide,

To understand the case it is best to show the batch file.

pushd "\\IP\shared"
forfiles /p "Z:" /m *.* /d -1 /c "cmd /c del /q @path"
popd
exit 0

The shared resources have sufficient permits, I do not think that is the problem in this case. The Veeam services in Windows are running from the Veeam administrator access account, with sufficient permissions as well.

The conclusion that had been reached in dealing with this case was that it was not possible to write to the share that veeam is currently using for the job.

The question of all this would be:
So why does a pre-script job option exist? if the reality is that this does not work correctly. Possible bug? perhaps you could review the development of this on your part, thus allowing the execution of this type of functionality.

Thanks,
PTide
Product Manager
Posts: 6408
Liked: 724 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Does not run Pre-job scripts

Post by PTide »

The conclusion that had been reached in dealing with this case was that it was not possible to write to the share that veeam is currently using for the job.
That is, you are saying that you've already tried to create/delete a dummy file in the share and it also failed, is that correct? Or you just tried to delete some veeam files on the repo? Have you tested the script against other share/files, did it work?

Pre-job script functionality exists to assist with tasks that cannot be performed by a job itself (example). Deleting files from the repository is clearly not an intended use of the functionality as jobs have a built-in retention logic.

BTW, it seems that you use pre-job script with a backup copy job, not with backup job, is that correct?

Thanks!
adlois
Novice
Posts: 7
Liked: never
Joined: Jan 03, 2019 3:35 pm
Contact:

Re: Does not run Pre-job scripts

Post by adlois »

That is, you are saying that you've already tried to create/delete a dummy file in the share and it also failed, is that correct? Or you just tried to delete some veeam files on the repo? Have you tested the script against other share/files, did it work?
It is correct, it was tested and it was deleted in the shared repository. The script works correctly. The same local user can be used.

Deleting files from the repository is clearly not an intended use of the functionality as jobs have a built-in retention logic.
But that's the logic of the retention policy in the real world does not work for all cases. An example would be the theme of the rotating external discotheques (post related) and the human factor of forgetting the rotating discotheques or if there is a chance of holidays in the environment, as well as the coherence of the retention points recorder by Veeam.

It is in that case when it is necessary to perform these subtasks of elimination of repositories, it can be contemplated and developed for future updates of time to be able to use this type of scripts with modifications in the shared repositories. .

BTW, it seems that you use pre-job script with a backup copy job, not with backup job, is that correct?
No, it is a pre-job script in backup job.
PTide
Product Manager
Posts: 6408
Liked: 724 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Does not run Pre-job scripts

Post by PTide »

Did I get it right - if a responsible person forgets to change the disk on Thursday, you want Friday backup job to overwrite Thursday backup?

Although I understand why you need that functionality and will certainly let the team know about your proposal, I am afraid that won't be implemented soon (if at all) as it assumes (from my point of view) big changes to the logic of how Veeam curently works with repos and backup files residing on them. The mechanism is one of the fundamental things, and is being constantly polished and adjusted. IMO, it is not the thing to tamper with, unless there is a solid reason to do so.

What you could possibly do, is to schedule your clean-up script to start independently (via Task Scheduler) 5-10 minutes in advance of the backup job.

Thanks!
adlois
Novice
Posts: 7
Liked: never
Joined: Jan 03, 2019 3:35 pm
Contact:

Re: Does not run Pre-job scripts

Post by adlois »

Did I get it right - if a responsible person forgets to change the disk on Thursday, you want Friday backup job to overwrite Thursday backup?
The responsible person should not forget the disk rotations, it is the responsibility of that person, I agree with that.

But I am referring to the case (and that once in this case has happened) that you forget to rotate the discs for a day. In that case the option would be either overwrite the copy, or delete the current full copy and make a new one.

I am grateful that you can transmit this proposal to the appropriate department and that you can improve this functionality. Although there are no guarantees of this, as is well done for the possible restructuring of the operational logic of Veeam currently working.
What you could possibly do, is to schedule your clean-up script to start independently (via Task Scheduler) 5-10 minutes in advance of the backup job.
This I have already tried and it works, but this forces to have to depend on a Windows program task, external to a Veeam configuration, in which veeam incorporates a retention policy that does not work.
Post Reply

Who is online

Users browsing this forum: aurelien-beneteau, Yannis and 150 guests