I can not take backup .bak from my database in Linux ubuntu
See this image I want to backup from conn1 database: CarSaleDatabase
I run this
USE CarSaleDatabase
GO
BACKUP DATABASE CarSaleDatabase
TO DISK = '/home/mohammadsgh/github/ddblab.bak'
but I get this error:
Msg 3201, Level 16, State 1, Line 5 Cannot open backup device '/home/mohammadsgh/github/ddblab.bak'. Operating system error 5(Access is denied.). Msg 3013, Level 16, State 1, Line 5 BACKUP DATABASE is terminating abnormally.
How can I do this?
BACKUP DATABASE
statement. What was the SQL you ran the get the error..? We can't help you if you don't he'll us help you – Larnu\\
for directory separators, it uses/
. Also, I doubt that themssql
user/group has access to that directory. – Larnumssql
or the groupmssql
has access to the directory you want to back up in. It also probably shouldn't, seeing as it's a user's home directory – Larnu