Deleted project - need to restore history

I have accidentally deleted the project , i have now got the project backup up but no history

 

How can i get the history back, this happened yesterday and i have not enabled clean up

7 comments
Comment actions Permalink

Hello,

Did you restore project configuration files from the backup? Usually it's all you need to do. Extact all configs from the backup, put them to the <TeamCity data directory>/config/projects folder and wait for some time till server detects these files and reloads them.

0
Comment actions Permalink

The issue is we don’t have a ‘backup’ or the project, we are just restoring deleted projects from the _trash folder

0
Comment actions Permalink

The trash directory should have all configs too. But you need to restore projects from there with proper ids.

Usually, removed project is saved into the trash under the name: <project id>_<project int id>, so when you restore it, suffix _<project int id> should be removed from the directory name.

0
Comment actions Permalink

Thanks Pavel

 

I have done this, but this is only restoring the build configurations, and not the build history. I still have the artifacts available in the system\artifacts folder, including the build log files, however these are not shown in the teamcity UI. Has the clean up job removed the builds from the internal database? Is there any way to restore these builds?
 
0
Comment actions Permalink

Cleanup removes data of removed configurations only when several days passed (5 days if I am not mistaken).

Could you please attach the list of files (recursively) under the <TeamCity data directory>/config/projects/<your project id>?

0
Comment actions Permalink

it seems that there was a cleanup this morning, which is why the history is not showing, all the artifacts are in the folders, is there a way to insert into the db?

0
Comment actions Permalink

Are you sure? Default timeout is 5 days. So if project was removed 5 days ago, then recent cleanup could remove its data.

If this is not the case, then please attach information which I asked before.

0

Please sign in to leave a comment.