bthompson Developer
|
Azure Dev Ops Local Backup using tf get
Tuesday, March 12 2024 11:53 PM
First you need to create a personal access token by going to
https://dev.azure.com/yourorgname/_usersSettings/tokens
replace “yourorgname” with your organization’s name
Give the token full permission. You may want to limit the permissions to what is the minimum necessary but limiting the permission scope may result in the download to always ask you for login. You should try or research that on your own.
Then you can create a bat file with the following code:
set mydate=%date:~4,2%%date:~7,2%%date:~10,4%
cd C:\AzureDevOpsBackupecho Start = %time%>> C:\AzureDevOpsBackup\logs\log_%mydate%.txt
tf get /recursive /login:yourtokenhere >> C:\AzureDevOpsBackup\logs\log_%mydate%.txt
echo Ended = %time%>> C:\AzureDevOpsBackup\logs\log_%mydate%.txt
Feel free to modify the code to your needs
reply
|