https://github.com/tomtom-international/artifactory-trash-restore
Script for restoring artifacts from Artifactory trashcan
https://github.com/tomtom-international/artifactory-trash-restore
Last synced: 2 months ago
JSON representation
Script for restoring artifacts from Artifactory trashcan
- Host: GitHub
- URL: https://github.com/tomtom-international/artifactory-trash-restore
- Owner: tomtom-international
- License: apache-2.0
- Created: 2022-02-25T09:22:54.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-09T07:15:28.000Z (over 2 years ago)
- Last Synced: 2025-01-28T16:14:43.359Z (4 months ago)
- Language: Python
- Size: 9.77 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# artifactory-trash-restore
[](https://github.com/tomtom-internal/artifactory-trash-restore/actions/workflows/build.yml)
Tool to restore artifacts from Artifactory trashcan.
In situations where lot of artifacts in many directories got moved to the trashcan, Artifactory is not capable of restoring them in one go. The user gets from the UI or the REST API the following error:
```text
Failed to execute moveout items list to move
```The only way to solve this is to restore the lowest folder with only artifacts inside. Doing this manually would result in lot of work. This is what this script is intended to do for you.
## Requirements
* Generate Artifactory access token
* Python 3.9## Usage
```bash
python3 -mvenv env
source env/bin/activate
pip3 install -r requirements.txtpython3 artifactory-trash-restore.py --url https://artifactory.acme.org/artifactory --token "$ARTIFACTORY_ACCESS_TOKEN" my-repository/path/
```## Contribution
[Pre-commit](https://pre-commit.com/) is used to validate your commits before submitting them to code review
* Make sure pre-commit is installed, e.g.,
```sh
python3 -m pip install pre-commit
```* Install pre-commit hook types
```sh
pre-commit install --install-hooks -t pre-commit -t commit-msg
```## License
Apache 2.0
## Author Information
See [CODEOWNERS](.github/CODEOWNERS).
---
Made with :green_heart:.