I would like to dump postgres database and make it periodical with crontab.
so I tried to run the following in a bash script:
sudo -u postgres pg_dump --dbname=postgresql://django:mypass@127.0.0.1:5432/django
I get this:
-bash: !: event not found
probably because there are special characters in the password. how to escape from special characters? how can I pass the password parameter? is there any other way to auto dump periodically from postgresql.