1

​We have a TFS2017 environment. The size is growing every week for a long time now.

In this environment , i have multiple collection ; the size of Transaction Log File , is very big (overtop the 155 Gb)

image

My question is : It's safe to do a shirnk of the log file for the defined TFS collection ? (without loss data or getting error in administration console) ?

Thanks

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
elcosta
  • 13
  • 3

1 Answers1

0

Yes. You can.

The log file is there so you can restore to a point in time between full backups. If you have backups enabled on your server and regularly take a full backup, then you can truncate the logs after each full backup.

If you want to just "delete the logs" then temporarily turn off TFS by running this on every application tier server you have: TFSServiceControl quiesce, then truncate the logs, then turn TFS back on using TFSServiceControl unquiesce.

You may also want to verify your backup strategy. If all is well, you shouldn't see a ever growing log file.

See:

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
  • so , before i would shrink the logs using some sql server commands ; i should stop TFS Services ?- – elcosta May 01 '20 at 16:02
  • and for all collection ? – elcosta May 01 '20 at 16:32
  • The stop command stops the application tier services, not the databases. You run the command on the application tier and it turns off the job agent, web UI and the webservices. You have to turn off each application tier en case your server is behind a loadbalancer. – jessehouwing May 01 '20 at 18:40