Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pause and resume scan from a space #13

Closed
dramkumar1 opened this issue May 15, 2024 · 5 comments
Closed

Pause and resume scan from a space #13

dramkumar1 opened this issue May 15, 2024 · 5 comments

Comments

@dramkumar1
Copy link

Hi, Is there an option to scan till a particular space, pause and continue scan from there at a later time?

@blupants
Copy link
Collaborator

It currently does not support that feature. However, I have been considering adding new input parameters with the default values:

--scan-workspaces = "*"
--skip-workspaces = ""
--scan-projects = "*"
--skip-projects = ""
--scan-tickets = "*"
--skip-tickets = ""

Each of those parameters would support a comma separated list of regexes to filter out workspaces (a.k.a. spaces in Confluence), project (unused by Confluence) and tickets (a.k.a. pages in Confluence).

That would allow you to skip a group of spaces in Confluence and resume the scanning by tweaking the input parameters.

You could do something like:

n0s1 confluence_scan --server "" --api-key "<API_TOKEN>" --skip-workspaces "IT,MARKETING,*CORP*,SALES"

Then, you could run subsequent complementary scans to cover what has been skipped:

n0s1 confluence_scan --server "" --api-key "<API_TOKEN>" --scan-workspaces "IT,MARKETING,*CORP*,SALES"

Do you think those new input parameters would cover your use case?

@dramkumar1
Copy link
Author

Thanks for considering my request. But I feel that more than specifying selected workspaces, it will be accurately helpful if I can stop the scan at some point and later restart from the selected workspace or from the last successfully completed workspace. Because it will take 40 hours or 50 hours or more to scan all the workspaces. I cannot have my system running for so much time without interruption or break. So in my case, I can never complete a successful scan.

@blupants
Copy link
Collaborator

Gotcha. I think a more generic input arguments like this would cover your use case:

--scan-target-keys = "*"
--scan-target-names = "*"
--skip-target-keys = ""
--skip-target-names = ""

--resume-target-key = "*"
--resume-target-name = "*"
--pause-target-key = ""
--pause-target-name = ""

In order to scan until workspace "MARKETING" you could run:

n0s1 confluence_scan --server "" --api-key "<API_TOKEN>" --pause-target-key "workspace" --pause-target-name "MARKETING"

Then, for the next scan to scan from "MARKETING" up to "SALES" you would run:

n0s1 confluence_scan --server "" --api-key "<API_TOKEN>" --resume-target-key "workspace" --resume-target-name "MARKETING" --pause-target-key "workspace" --pause-target-name "SALES"

That's the feature you are looking for, correct?

@dramkumar1
Copy link
Author

Hi, Yes this is somewhat helpful feature.
During my usage of this tool, I noticed that this tool scans the workspaces in the same order as we see in the settings, where confluence will list the workspaces a particular user has access to.
So, to start with, I would say, adding just 'to start from workspace' would be enough, assuming that all the successfully scanned previous workspaces results are stored in common file so that it could be viewed anytime during the scan.

n0s1 confluence_scan --server "" --api-key "<API_TOKEN>" --start-from-workspace "workspace_name"

@dramkumar1
Copy link
Author

Hi, I would like to inform that I have modified the code to start from the last completed scan. So, I am closing this issue.
Thanks for your suggestions and inputs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants