For SQL Server on Windows for getting default backup folder we can use master.dbo.xp_instance_regread: But for Linux it does not work. Can anyone help with T-SQL approach (I only find SSMS solution here)? Answer I’ve never found a non-registry way to get the backup directory reliably in t-sql. I usually just do a replace of /data/ to /backup/ since at