Change default directory for backups through REST API

I'm using the rest API to automate TeamCity backups using Cron and  wget. Everything works fine except I'd like to change where the backup is written too. Currently it writes to the default backup directory but I need to have it write to an NFS mount. Is there anyway to change the default directory when doing backups using the REST API?
I've tried setting the fileName to include a file path but get errors. I've downloaded the application.wadl and don't see any parameters in there that I can pass a different directory for the backups.
Any help would be appreciated.
Thanks,

ES.

3 comments

Eric,

Sorry for the delay in replying.

There is no way to do that now. See also/cooment on TW-12598.
Absolute file names for the fileName are prohibited for the security reasons. This can be allowed, but needs more considerations.

For now you can either map default backup directory to the necessary place or use some backgroud process on the server that will move the files form the default directory to the place you need.

0

Thanks Yegor. I have changed the default backup directory to our NFS mounted directory. If I kick off a manual backup through the UI it writes properly to this drive. But if I use the REST API web call the backup does not go to my default directory but to the original TeamCity backup directory, this is the issue. Should the REST api be writing to the backup directory defined in my Backup Settings page, that would be ideal if it did, or is this a bug?

Thanks,

ES.

0

Eric,

Sorry for the delay in replying.

TeamCity 5.x does not support changing default backup directory in the setting. You specify absolute file name in the backup settings on UI, not the directory.
In TeamCity 6.0 there will be an option to change the default backup directory in the configuration file.

For now you can probably try to map .BuildServer/backup to NFS mount using OS functinoality or setup a mirroring process from one directory to another.

0

Please sign in to leave a comment.