Whenever you start showing hands-on demo, you became a legend to me, you are genius on explaining things but hands-on demo make you super special. Keep up your good work.
This is a wonderful video! You inspire me to keep pushing! A clever mnemonic (not my own) for remembering tar: czvf = create ze vucking file xzvf = xtract ze vucking file
Another fantastic informative vid... quick question, or better still a follow up vid request... how to extend this to concept to my NAS drive, i.e. NFS storage?
Error: Database is uninitialized and superuser password is not specified. You must specify POSTGRES_PASSWORD to a non-empty value for the superuser. For example, "-e POSTGRES_PASSWORD=password" on "docker run". You may also use "POSTGRES_HOST_AUTH_METHOD=trust" to allow all connections without a password. This is *not* recommended. See PostgreSQL documentation about "trust": www.postgresql.org/docs/current/auth-trust.html
For me, the data is correctly restored even after running 'docker -rm , but the backup files are not visible on the host or in the container. Anyone has an idea why?
Hi Hussein, you are better than uni professor. Thanks for the video. I am wondering if it is possible to attach this volume of data to more than one postgres container for load balancing?
Hi Hussein, Thanks for this video. If created a postgresql 9.5 container and add a volume /pg to it, and several days later created a new container for postgresql 10 and used same data volume /pg folder. Is there any problem for this operation?
Great video! can you research more advanced topic? best way to work with postgres data migrations. When you have postgres db in one container and backend app on other container. Backend app on java (ktor or vertx or other lightweight backend framework even in pure netty) 1) What the best way to initialize initial database structure with all required extensions(ex timescaledb) 2) What the best way to migrate database data structure while your project evolving Thanks!
Good tutorial, but the PostgreSQL Docker container has changed, so you cannot easily follow along any more. You have to do stuff like add "--env POSTGRES_PASSWORD=password" to his command lines.
AudacityTunesE.T.C its a great idea for sure. I usually use technology that ai have explained in the channel. Since I still didn’t talk about compose I decided to go the simple route to explain things. Need to make the compose video that is a great idea! Thanks!
Hello Hussein, (I am on Windows) I have a Docker container setup with the newest PostgreSQL image and used the docker run command in this video. In Docker I can see the container is running and with docker ps I can see the container. Docker inspect on the Container ID shows everything looks great. However, in PgAdmin4 when I create a server: General Tab, server name: pg, Connection Tab: Port 5432, Maintenance Database is postgres, Username is postgres, Password is postgres, I cannot create the server because no "Host name/address" ever works! Yours is Husseinmac, but I do not know what mine is to get this working! Please advise, Thank You.
Hi Hussein. Congratulations for your great tutorials !!! After deciding to transfer my postgres with the persistant data from my Windows machine to a Linux machine (ubuntu 20.04) , i faced the following problem. I tranfered the tar file to the linux machine and untared it but without any luck. While trying to start running the postgres image with the persistant volume attached , the following error appears on the terminal . LOG: unrecognized configuration parameter "max_wal_size" in file "/var/lib/postgresql/data/postgresql.conf" line 228 LOG: unrecognized configuration parameter "min_wal_size" in file "/var/lib/postgresql/data/postgresql.conf" line 229 FATAL: configuration file "/var/lib/postgresql/data/postgresql.conf" contains errors Also i tried with the unziped folder to check if there was any error on the compression/decompression of the folders. Also In this case i get the same error message? Is there any workaround on this ? Has anyone faced the same problem ?
you can't, this is a bad idea. there might be a way to run postgres as read only even then the way the database locks files on disk . You can run one at a time but not two at the same time.
Great vid. Thanks. One question guys, on a linux server, what is a good place/path to map as the data folder? Should it be in the $user folder, or some path from / I'm asking this because I'm assuming changing the user's name should not affect how the container works, right?
Just off the top of my head, since PostgreSQL stores its data in /var/lib/postgresql/data, why not user /var/lib/postgresql/data/$container_name$ or something like that
@@hnasr yeah, it is enabled. The error details are here. There is no direct volume mapping we can do in windows for postgres till date. forums.docker.com/t/data-directory-var-lib-postgresql-data-pgdata-has-wrong-ownership/17963
@@BhargavMurari Works for me. I have enabled linux container on docker as well. docker run --name pg -p 5432:5432 -e POSTGRES_PASSWORD=postgres -v C:\Users\*******\Documents\postgres_v:/var/lib/postgresql/data postgres:10
If you guys are interested in a node ts and postgres setup with docker you can checkout this blog: yzia2000.github.io/blog/2021/01/15/docker-postgres-node.html
Whenever you start showing hands-on demo, you became a legend to me, you are genius on explaining things but hands-on demo make you super special. Keep up your good work.
This is a wonderful video! You inspire me to keep pushing!
A clever mnemonic (not my own) for remembering tar:
czvf = create ze vucking file
xzvf = xtract ze vucking file
Matthew Wiese LOL I LOVED IT!!! I am going to start using it!
Let me tell you- when I looked this topic up and saw you had a video in the search results, I felt instant relief. Dare I say, excited
when ever I am looking for something and I see your video am excited that I have found what I am looking for
This guy's a natural teacher - thank you for the content! Made my life much easier.
how to remember tar flags:
tar -xzf eXtract Ze Files.
tar -czf Compress Ze Files.
haha dude that awesome.
Thank you Hussein for your explanation, I tended to use docker volume for the exact same case you mentioned in 12:10
Hussein god bless u with this information
Exactly what I was looking for and perfectly explained, thanks a lot!
thanks Hussein, its so simple and clear .
dude... when I'm searching for some topic video and I see one of yours... ;-)
I already like it first and then proceed to see the video... LOL!!!
This guy is funny. No dull moment with him lol
Keep on Hussein this is perfect !
That's exactly what I was looking for, Thanks a lot.
Very well explained, & clear communication, - so many tech videos are created by people who are very difficult to understand. Thank you! :) ATB
Sweet, Succinct and straight to the point
Thanks 😊 docker is awesome. enjoy the content.
Super clear man! Thank you!
Thanks hussein
Another fantastic informative vid... quick question, or better still a follow up vid request... how to extend this to concept to my NAS drive, i.e. NFS storage?
Well done bro!
Great video!! Thank you 😊
Thanks for watching and for all your comments!!
Very useful video
Error: Database is uninitialized and superuser password is not specified.
You must specify POSTGRES_PASSWORD to a non-empty value for the
superuser. For example, "-e POSTGRES_PASSWORD=password" on "docker run".
You may also use "POSTGRES_HOST_AUTH_METHOD=trust" to allow all
connections without a password. This is *not* recommended.
See PostgreSQL documentation about "trust":
www.postgresql.org/docs/current/auth-trust.html
For me, the data is correctly restored even after running 'docker -rm , but the backup files are not visible on the host or in the container. Anyone has an idea why?
Hi Hussein, you are better than uni professor. Thanks for the video. I am wondering if it is possible to attach this volume of data to more than one postgres container for load balancing?
Great video!
Thanks for your support in all the videos I make 😊 One of the OG subs
Hi Hussein, Thanks for this video. If created a postgresql 9.5 container and add a volume /pg to it, and several days later created a new container for postgresql 10 and used same data volume /pg folder. Is there any problem for this operation?
Great video! can you research more advanced topic? best way to work with postgres data migrations. When you have postgres db in one container and backend app on other container. Backend app on java (ktor or vertx or other lightweight backend framework even in pure netty)
1) What the best way to initialize initial database structure with all required extensions(ex timescaledb)
2) What the best way to migrate database data structure while your project evolving
Thanks!
Awesome video +++++++++++++++ 🙂
Thank you
Good tutorial, but the PostgreSQL Docker container has changed, so you cannot easily follow along any more. You have to do stuff like add "--env POSTGRES_PASSWORD=password" to his command lines.
The problem is when my volume dont have the rights permissions. Aways it come with only root permissions to write and read
is it possible to use two named volumes in the same Postgres Container ?
Can you track with git the files in the docker volumes? Will that be a good idea?
Awesome dude, but why not use docker-compose so as not to re-type lengthy commands ?
AudacityTunesE.T.C its a great idea for sure. I usually use technology that ai have explained in the channel. Since I still didn’t talk about compose I decided to go the simple route to explain things.
Need to make the compose video that is a great idea! Thanks!
@@hnasr it's alright, I understand 👌
Any idea when you plan to make a video on docker-compose ?
Hello Hussein, (I am on Windows) I have a Docker container setup with the newest PostgreSQL image and used the docker run command in this video. In Docker I can see the container is running and with docker ps I can see the container. Docker inspect on the Container ID shows everything looks great. However, in PgAdmin4 when I create a server: General Tab, server name: pg, Connection Tab: Port 5432, Maintenance Database is postgres, Username is postgres, Password is postgres, I cannot create the server because no "Host name/address" ever works! Yours is Husseinmac, but I do not know what mine is to get this working! Please advise, Thank You.
try: localhost
Hi Hussein. Congratulations for your great tutorials !!! After deciding to transfer my postgres with the persistant data from my Windows machine to a Linux machine (ubuntu 20.04) , i faced the following problem. I tranfered the tar file to the linux machine and untared it but without any luck. While trying to start running the postgres image with the persistant volume attached , the following error appears on the terminal .
LOG: unrecognized configuration parameter "max_wal_size" in file "/var/lib/postgresql/data/postgresql.conf" line 228
LOG: unrecognized configuration parameter "min_wal_size" in file "/var/lib/postgresql/data/postgresql.conf" line 229
FATAL: configuration file "/var/lib/postgresql/data/postgresql.conf" contains errors
Also i tried with the unziped folder to check if there was any error on the compression/decompression of the folders. Also In this case i get the same error message?
Is there any workaround on this ? Has anyone faced the same problem ?
Thanks!!!
how do make 2 postgres containers have shared volumes so any changes on one it will affect the other ?
you can't, this is a bad idea. there might be a way to run postgres as read only even then the way the database locks files on disk . You can run one at a time but not two at the same time.
Great vid. Thanks. One question guys, on a linux server, what is a good place/path to map as the data folder? Should it be in the $user folder, or some path from / I'm asking this because I'm assuming changing the user's name should not affect how the container works, right?
Just off the top of my head, since PostgreSQL stores its data in /var/lib/postgresql/data, why not user /var/lib/postgresql/data/$container_name$ or something like that
The permissions might be the most important issue here...
Could you please show the same with the docker container. I'm trying3 times and my db is empty without structure.
Try to use docker start command
👏🏻
This doesn't work on Windows machine docker till date for postgres.
Can you make sure you enabled linux container on docker for windows?
@@hnasr yeah, it is enabled. The error details are here. There is no direct volume mapping we can do in windows for postgres till date. forums.docker.com/t/data-directory-var-lib-postgresql-data-pgdata-has-wrong-ownership/17963
I mean volume mapping to my C:/postgrrs/data like that
@@BhargavMurari Works for me. I have enabled linux container on docker as well. docker run --name pg -p 5432:5432 -e POSTGRES_PASSWORD=postgres -v C:\Users\*******\Documents\postgres_v:/var/lib/postgresql/data postgres:10
@@abhisheksahu616 using WSL2?
If you guys are interested in a node ts and postgres setup with docker you can checkout this blog: yzia2000.github.io/blog/2021/01/15/docker-postgres-node.html
this guy wrote tar with correct syntax in one try without googling....