This tool allows to check if some of the files for collosus were lost and if they can be found on other nodes.
# Install dependencies
yarn install
# Build the project
yarn build
Run the program using yarn start. You will see the command seleciton menu.
- Index local files
localFiles
@param <pathToDirectory>
This command will index the files in the directory and create a file localFiles.json
in the root directory of the project. It will be used
for comparison later.
- Index objects from bucket
bucketObjects
@param <bucketId>
@param <optional> <bagId>
This will get all the bags from the bucket and index all the objects in them. It will create a file remote.json
in the root directory of the project.
With provided bagId
it will get all the objects from the bag and index them. It will create a file remote-${bagId}.json
in the root directory of the project.
- Compare the files
diff
@param <optional><bagId>
This will compare your bags from local.json
with the bags from remote.json
and will output the results in diff.json
in the root directory of the project and in the console.
With provided bagId
it will compare your bags from local.json
with the bags from remote-${bagId}.json
and will output the results in diff-${bagId}.json
in the root directory of the project and in the console.
- Check missing files
checkMissing
@param <pathToDiff>
@param <optional> <ignoreSp>
This will check the diff.json
file and will show if some of the other SP has the missing files.
You can specify the custom path to diff file and include the SP that you want to ignore in the search.
e.g
- Download missing files
downloadMissing
This should be used after the checkMissing command. It will download the missing files from the remote node containing missing files.
$ yarn start restoreMissing ./jsons/diff.json 1,2,5
- Manual HEAD request
head <providerUrl>
@param <providerUrl>
This will execute a HEAD request to the specified url and will indicate a presence of the file.
-
Check Remote node
remotenode @param <providerUrl>
This will check the remote node and will return the same output as the localFiles command.
-
Check single operator
checknode @param <providerUrl>
This is a combination of remoteNode, bucketObjects and diff commands for a single operator. It will check the operator, check all files for its bags in QN and will generate a diff.
-
Check all operators
checkalloperators
This is a combination of remoteNode, bucketObjects and diff commands. It will check all the operators, check all files in QN and will generate a diff.