import .sql into postgres db command 1

import .sql into postgres db command

psql -h localhost -U postgres -d postdata -f D:\Backup\database.sql

Here is what the above code is Doing:
1. The first line is the path to the PostgreSQL executable.
2. The second line is the path to the backup file.
3. The third line is the path to the database.
4. The fourth line is the path to the database user.
5. The fifth line is the path to the database host.
6. The sixth line is the path to the database.
7. The seventh line is the path to the SQL file.

Similar Posts