Discussion Forum

Main >> General Web Development Discussions>> Azure Dev Ops Local Backup using tf get

All Threads Register Login New Discussion
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
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

Post a Replyreply

AT Integrated Inc. | 913 Ridgebrook Rd Suite 109, Sparks, MD 21152 | T: 410-472-2490
Copyright © 2024 AT Integrated Inc. All rights reserved.