Relative Content

Tag Archive for phpsqlsql-serverubuntubackup

Backup SQL Server database on linux from PHP

I am using SQL Server 2022 Express on Ubuntu Server 22.04, and PHP 8.3.
I am trying to backup a database, the instruction is: BACKUP DATABASE WEBDEV TO DISK = ‘/temp/WEBDEV.bak’, and when I execute it from Management Studio, it creates the file correctly, but when I execute it from PHP it does not show any error, but the file is not created. I already make the /temp/ directory with 777 permission, and the result is the same, It does not create the backup file and it does not show any error.
My code is this: