<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Wajid Saleem</title>
    <description>The latest articles on DEV Community by Wajid Saleem (@wajid_saleem_15f4c7513ce5).</description>
    <link>https://dev.to/wajid_saleem_15f4c7513ce5</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1495742%2F6c8a75e3-642e-4fa3-803d-62950606b740.jpg</url>
      <title>DEV Community: Wajid Saleem</title>
      <link>https://dev.to/wajid_saleem_15f4c7513ce5</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/wajid_saleem_15f4c7513ce5"/>
    <language>en</language>
    <item>
      <title>Mastering PostgreSQL Backups with pg_dump</title>
      <dc:creator>Wajid Saleem</dc:creator>
      <pubDate>Fri, 31 May 2024 06:51:20 +0000</pubDate>
      <link>https://dev.to/wajid_saleem_15f4c7513ce5/mastering-postgresql-backups-with-pgdump-2kh3</link>
      <guid>https://dev.to/wajid_saleem_15f4c7513ce5/mastering-postgresql-backups-with-pgdump-2kh3</guid>
      <description>&lt;p&gt;Backups are critical in database management, and PostgreSQL offers a powerful tool for this purpose: pg_dump. This guide will walk you through using pg_dump to create efficient and reliable backups.&lt;/p&gt;

&lt;p&gt;What Is pg_dump?&lt;br&gt;
pg_dump is a command-line utility for creating backups of a PostgreSQL database. It can export an entire database or specific parts, such as individual tables or schemas. The output can be:&lt;/p&gt;

&lt;p&gt;SQL Script: A plain-text file with SQL commands to recreate the database.&lt;br&gt;
Directory-Based Archive: A set of folders designed to be portable across architectures, to be restored using pg_restore.&lt;br&gt;
pg_dump ensures consistent backups even when the database is in use.&lt;/p&gt;

&lt;p&gt;pg_dump [options] [dbname]&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dump a Database Into an SQL Script&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;pg_dump -U admin -d company -f company_backup.sql&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dump a Database With Create Command&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;pg_dump -U admin -d company -f company_backup.sql --create&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dump a Database Into a Directory-Format Archive&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;pg_dump -U admin -d company -F d -f company_backup&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Export Data Only&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;pg_dump -U admin -d company -f company_backup.sql --data-only&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Export Schema Only
pg_dump -U admin -d company -f company_backup.sql --schema-only&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;*Include Only Specific Schemas&lt;/p&gt;

&lt;p&gt;pg_dump -U admin -d company -n 'p*' -f company_backup.sql&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Include Only Specific Tables&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;pg_dump -U admin -d company -t '&lt;em&gt;order&lt;/em&gt;' -f company_backup.sql&lt;/p&gt;

&lt;p&gt;pg_dump is a versatile and powerful tool for PostgreSQL backups. Understanding its options and commands allows you to create precise and effective backups tailored to your needs. For more advanced database management, consider tools like DbVisualizer, which simplify the process with a graphical interface.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Installation of PostgreSQL on Rocky Linux</title>
      <dc:creator>Wajid Saleem</dc:creator>
      <pubDate>Wed, 15 May 2024 02:31:24 +0000</pubDate>
      <link>https://dev.to/wajid_saleem_15f4c7513ce5/installation-of-postgresql-on-rocky-linux-4h00</link>
      <guid>https://dev.to/wajid_saleem_15f4c7513ce5/installation-of-postgresql-on-rocky-linux-4h00</guid>
      <description>&lt;p&gt;Run the following commands on your rocky Linux to just get simple installation of postgres&lt;/p&gt;

&lt;p&gt;dnf module list PostgreSQL # to check the modules of postgres available in the operating system. &lt;/p&gt;

&lt;p&gt;sudo dnf module enable postgresql:15   #to enable the default stream of postgress Hint : change the version you want to use as default like 12,13 or 14 &lt;/p&gt;

&lt;p&gt;sudo dnf install postgresql-server   #it will install the dependencies and packages of postgres &lt;/p&gt;

&lt;p&gt;sudo postgresql-setup --initdb #to initialize db using the script ( postgresql-setup) downloaded with all the packages in previous commands&lt;/p&gt;

&lt;p&gt;sudo -i -u postgres   #To go to postgres default user created when the packages installed. &lt;/p&gt;

&lt;p&gt;psql                  #after &lt;/p&gt;

&lt;p&gt;create user repuser replication;  #To create user &lt;/p&gt;

</description>
      <category>programming</category>
      <category>opensource</category>
      <category>postgres</category>
    </item>
  </channel>
</rss>
