No idea what im doing wrong here?
- I then get the error: -bash: /backuplocation/teslamate.bck: No such file or directory
- If i use the md command to create a folder i get this error: -bash: -bash:: command not found
The "md" command doesn't exist on Unix (that's from Windows), the correct command to create a directory is "mkdir":
Code:
sudo mkdir /backuplocation
sudo docker-compose exec -T database pg_dump -U teslamate teslamate > /backuplocation/teslamate.bck
I would recommend however that instead of creating the directory within root that you create the backup location within your home directory - you can add a "~" as a shortcut for that. It will remove the necessity to work as "root". You can also swap out "backuplocation" for a simpler name if you'd like.
Code:
mkdir ~/backuplocation
docker-compose exec -T database pg_dump -U teslamate teslamate > ~/backuplocation/teslamate.bck
Last edited: