How to restore content from trashcan in Artifactory? [Video]

How to restore content from trashcan in Artifactory? [Video]

AuthorFullName__c
Eran Blumenthal
articleNumber
000004909
FirstPublishedDate
2020-11-18T10:56:50Z
lastModifiedDate
2025-05-14
VersionNumber
8

Restoring deleted/overwritten artifacts in Artifactory



 

Video Transcript: 

Hello and good day! My name is Aran, and I am from the JFrog support team. In this short video, I will show how to restore content from the trash can in Artifactory.

Let's start.

First, we will go into the artifact browser and overwrite file 1_5. Okay, let us overwrite this file. As you can see, this file was uploaded by myself.

Next, let us delete another file and see that it has reached the trash can.

So, we have the overwritten file and the deleted file.

Now, all we need to do in order to restore these files is either to restore the entire folder that was hosting them or restore each individual file.

In this case, I can restore both of them because, in this context, it makes sense, so I will restore.

When I restore, I can actually restore to a different location from the one that I deleted or overwritten on. So, I can move it to any other repository in Artifactory.

In this case, again, we will keep the same location that we deleted from.

Now we see the file was returned, and we also see a different file that was deployed by another entity. This is the original file.

Next, I want to delete another file but restore it from the command line through the REST API.

We deleted the file, and now let's see how we restore it from the command line.

To restore from the command line, I will use curl with the -u option and the Artifactory REST API.

Please note that this refers to api/trash/restore. After that, I provide the path to the file in the trash can and then the destination.

Even through the REST API, I have the same option to restore to a different location than the one that I deleted the file from.

So, let's go. I'll put my password, and the response is "Successfully restored trash items."

Now, let's see this in the UI. Let me refresh.

Here we go, the file was restored and removed from the trash can.

That's it. Thank you very much. That was my video on restoring from the Artifactory trash can.

Thanks for watching, and I hope you have enjoyed it. Feel free to leave your comments, feedback, or questions in the comment section below.