Closed figalex closed 9 years ago
Are you logged in as the root user or some other user? Are you literally typing "/root/path/to/backup" or are you changing that to a folder that already exists?
I have this same issue when working on Digital Ocean, I've logged in via SSH on root and run the mongodb:dump command which gives me the same error. Still trying to work it out.
Update: Still no luck unfortunately, I created a new folder in ~/ called "tmp" and ran "dokku mongodb:dump dbName -tar" from inside this "tmp" folder. and get this error:
2015-06-29T21:05:53.629-0400 Failed: error creating directory /root/tmp/dnName-2015-06-29-21h05m53s/dnName
: mkdir /root/tmp: permission denied.
An error occured while executing mongodump. Please check whether you have sufficient write privileges in /root/tmp
I then gave the "tmp" directory 777 privileges but still no luck.
My guess is that this dump command is internally run using another user who has no ability to create folders etc
Any suggestions anyone?
I'm not sure if it helps at all... the mongodump command, when using dokku mongodb:dump runs as the dokku user. If the folder has 777 permissions though.. that should be sufficient.
I have an identical issue, even with 777 permissions on the directory.
@newbreedofgeek / @figalex - did either of you ever have any luck solving this?
@lucykav @jeffutter unfortunately I never got this working, I've started thinking about a different way to BU the DB as the dump cmd does not work (even with proper permissions set on the folder)
I'll update if I work it out...
Update:
@lucykav @jeffutter
I tried it again today and it worked!
Not sure what I did different, here are the exact steps:
1) SSH into your machine as root 2) create a new folder - "mkdir /dbbu" 3) set chmod 777 on dbbu 4) confirm this setting, then go into dbbu (cd dbbu) 5) now run the BU command "dokku mongodb:dump yourdbname -tar"
It should just work.
Same problem. I added the ability to specify dump folder, al least its nice for bash backup script :)
:cool:
sudo mongodump --out /mongoDump works
I'm trying to do
mongodb:dump
but I keep getting the following error:error: boost::filesystem::status: Permission denied: "/root/path/to/backup" An error occured while executing mongodump. Please check whether you have sufficient write privileges in /root
What do I have to do to be able to make a backup?