<?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: GraphPe</title>
    <description>The latest articles on DEV Community by GraphPe (@graphpe).</description>
    <link>https://dev.to/graphpe</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%2Forganization%2Fprofile_image%2F9624%2F2c15152c-2948-4f01-aa9c-bba7a93c5926.png</url>
      <title>DEV Community: GraphPe</title>
      <link>https://dev.to/graphpe</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/graphpe"/>
    <language>en</language>
    <item>
      <title>Essential Linux Text Manipulation Tools: cut, sort, uniq, tr 🛠️</title>
      <dc:creator>Oliver Bennet</dc:creator>
      <pubDate>Wed, 20 Nov 2024 11:23:34 +0000</pubDate>
      <link>https://dev.to/graphpe/essential-linux-text-manipulation-tools-cut-sort-uniq-tr-269</link>
      <guid>https://dev.to/graphpe/essential-linux-text-manipulation-tools-cut-sort-uniq-tr-269</guid>
      <description>&lt;p&gt;&lt;strong&gt;Linux's&lt;/strong&gt; text processing commands are the Swiss Army knives for developers and sysadmins. In this post, I break down four essential tools—cut, sort, uniq, and tr—that can simplify your workflows:&lt;/p&gt;

&lt;p&gt;🔥 Key Features&lt;br&gt;
🔥 40+ Practical Examples&lt;br&gt;
🔥 Real-World Use Cases&lt;/p&gt;

&lt;p&gt;💡 Whether you're a beginner or an advanced user, this guide will help you unlock new efficiencies.&lt;/p&gt;

&lt;p&gt;👉 Check it out here: &lt;a href="https://graphpe.medium.com/4-most-essential-text-manipulation-tools-in-linux-cut-sort-uniq-tr-0ce09623f862" rel="noopener noreferrer"&gt;4 Most used text manipulation tools&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag__link"&gt;
  &lt;a href="https://graphpe.medium.com/4-most-essential-text-manipulation-tools-in-linux-cut-sort-uniq-tr-0ce09623f862" class="ltag__link__link" rel="noopener noreferrer"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmiro.medium.com%2Fv2%2Fresize%3Afill%3A88%3A88%2F1%2AzMbYz7ccvNTjb7TNuHHBZA.jpeg" alt="Oliver Bennet"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://graphpe.medium.com/4-most-essential-text-manipulation-tools-in-linux-cut-sort-uniq-tr-0ce09623f862" class="ltag__link__link" rel="noopener noreferrer"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;4 Most Essential Text Manipulation Tools in Linux: cut, sort, uniq, tr | by Oliver Bennet | Nov, 2024 | Medium&lt;/h2&gt;
      &lt;h3&gt;Oliver Bennet ・ &lt;time&gt;Nov 20, 2024&lt;/time&gt; ・ 
      &lt;div class="ltag__link__servicename"&gt;
        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fassets.dev.to%2Fassets%2Fmedium-f709f79cf29704f9f4c2a83f950b2964e95007a3e311b77f686915c71574fef2.svg" alt="Medium Logo"&gt;
        graphpe.Medium
      &lt;/div&gt;
    &lt;/h3&gt;
&lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;p&gt;Have any creative use cases of your own? Let's discuss in the comments!&lt;/p&gt;

&lt;h1&gt;
  
  
  Linux #TextProcessing #CLI #OpenSource #DevOps #BashScripting
&lt;/h1&gt;

</description>
      <category>bash</category>
      <category>linux</category>
      <category>ubuntu</category>
      <category>archlinux</category>
    </item>
    <item>
      <title>Prometheus 3.0: A Quantum Leap in Monitoring</title>
      <dc:creator>Oliver Bennet</dc:creator>
      <pubDate>Mon, 18 Nov 2024 07:06:01 +0000</pubDate>
      <link>https://dev.to/graphpe/prometheus-30-a-quantum-leap-in-monitoring-30ea</link>
      <guid>https://dev.to/graphpe/prometheus-30-a-quantum-leap-in-monitoring-30ea</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2iw56nun1hv9xova9z3v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2iw56nun1hv9xova9z3v.png" alt="Prometheus" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prometheus&lt;/strong&gt;, the open-source systems monitoring and alerting toolkit, has long been a favorite among DevOps engineers and system administrators. Its powerful query language, PromQL, and flexible data model have made it a go-to tool for monitoring complex systems. With the recent release of Prometheus 3.0, the platform has taken a significant leap forward, introducing a host of new features and improvements that elevate its capabilities to new heights.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Features and Enhancements
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffus2c1h41polak77j7jp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffus2c1h41polak77j7jp.png" alt="Prometheus" width="779" height="306"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Native Histograms:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Prometheus 3.0 introduces native support for histograms, a data type that efficiently captures distribution information. This is particularly useful for metrics like response times, request durations, and latency.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;By leveraging native histograms, Prometheus can provide more accurate and granular insights into the performance of your systems.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  OpenTelemetry Support:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Prometheus 3.0 strengthens its integration with OpenTelemetry, a vendor-neutral observability framework. This enables seamless collection and analysis of telemetry data from various sources, including applications, infrastructure, and cloud services.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;By adopting OpenTelemetry, you can simplify your monitoring setup and gain a more comprehensive view of your entire technology stack.&lt;br&gt;
Performance Optimizations:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Prometheus 3.0 incorporates several performance optimizations, including:&lt;br&gt;
Faster query execution, especially for complex queries.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reduced memory usage, leading to improved scalability.&lt;br&gt;
Enhanced data ingestion and storage efficiency.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;These optimizations ensure that Prometheus can handle larger workloads and provide real-time insights without compromising performance.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Enhanced PromQL:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;PromQL, the powerful query language for Prometheus, has been further refined in 3.0 with the addition of new functions and operators:&lt;/li&gt;
&lt;li&gt;delta: Calculates the difference between two time series.
changes: Counts the number of changes in a time series.&lt;/li&gt;
&lt;li&gt;rate_interval: Calculates the rate of change over a specific interval.
These new capabilities empower you to perform more sophisticated analysis and troubleshooting tasks.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Improved Alerting:
&lt;/h3&gt;

&lt;p&gt;The alerting system in Prometheus 3.0 has been enhanced with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enhanced filtering: More flexible filtering options for alerts.&lt;/li&gt;
&lt;li&gt;Improved grouping: Better grouping of alerts based on specific criteria.&lt;/li&gt;
&lt;li&gt;Enhanced notification channels: Support for additional notification channels, including email, SMS, and PagerDuty.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These improvements streamline the alert management process and ensure timely notifications of critical issues.&lt;/p&gt;

&lt;h3&gt;
  
  
  New Web UI:
&lt;/h3&gt;

&lt;p&gt;Prometheus 3.0 boasts a redesigned web UI with a modern look and feel. The new UI offers:&lt;/p&gt;

&lt;p&gt;-Improved navigation and search capabilities.&lt;br&gt;
-More intuitive query building and visualization tools.&lt;br&gt;
-Enhanced performance and responsiveness.&lt;/p&gt;

&lt;p&gt;The new UI makes it easier to explore and analyze your monitoring data.&lt;/p&gt;
&lt;h3&gt;
  
  
  Why Upgrade to Prometheus 3.0?
&lt;/h3&gt;

&lt;p&gt;Upgrading to Prometheus 3.0 is highly recommended for several reasons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enhanced Performance: The performance optimizations in 3.0 ensure that Prometheus can handle larger workloads and provide real-time insights.&lt;/li&gt;
&lt;li&gt;Improved Scalability: Native histograms and other enhancements make 
Prometheus more scalable, allowing it to monitor larger and more complex systems.&lt;/li&gt;
&lt;li&gt;Increased Functionality: The new features in 3.0, such as OpenTelemetry support and enhanced PromQL, provide greater flexibility and power.&lt;/li&gt;
&lt;li&gt;Better User Experience: The redesigned web UI offers a more intuitive and efficient user experience.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Breaking Changes
&lt;/h3&gt;

&lt;p&gt;While most of the changes in Prometheus 3.0 are backward-compatible, there are a few breaking changes that you should be aware of. These include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Changes to the rate function: The rate function now calculates the rate of change over a specific interval, rather than the instantaneous rate of change.&lt;/li&gt;
&lt;li&gt;Changes to the irate function: The irate function now uses a more accurate algorithm to calculate the instantaneous rate of change.&lt;/li&gt;
&lt;li&gt;Changes to the increase function: The increase function now returns the total increase over a specific interval, rather than the instantaneous rate of increase.&lt;/li&gt;
&lt;li&gt;It's essential to review the migration guide provided by the Prometheus team to ensure a smooth upgrade process.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgwdy9s5102miy6r2zbon.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgwdy9s5102miy6r2zbon.png" alt="Prometheus" width="600" height="450"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Prometheus 3.0 is a significant milestone in the evolution of this powerful monitoring solution. The new features and improvements make it even more robust, efficient, and user-friendly. By upgrading to 3.0, you can gain deeper insights into your systems, improve performance, and enhance your overall monitoring strategy.&lt;/p&gt;
&lt;h2&gt;
  
  
  Recent Articles
&lt;/h2&gt;


&lt;div class="ltag__link"&gt;
  &lt;a href="https://graphpe.medium.com/effortless-file-transfers-a-guide-to-using-scp-and-rsync-f3403d67a580" class="ltag__link__link" rel="noopener noreferrer"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmiro.medium.com%2Fv2%2Fresize%3Afill%3A88%3A88%2F1%2AzMbYz7ccvNTjb7TNuHHBZA.jpeg" alt="Oliver Bennet"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://graphpe.medium.com/effortless-file-transfers-a-guide-to-using-scp-and-rsync-f3403d67a580" class="ltag__link__link" rel="noopener noreferrer"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Effortless File Transfers: A Guide to Using scp and rsync | by Oliver Bennet | Nov, 2024 | Medium&lt;/h2&gt;
      &lt;h3&gt;Oliver Bennet ・ &lt;time&gt;Nov 15, 2024&lt;/time&gt; ・ 
      &lt;div class="ltag__link__servicename"&gt;
        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fassets.dev.to%2Fassets%2Fmedium-f709f79cf29704f9f4c2a83f950b2964e95007a3e311b77f686915c71574fef2.svg" alt="Medium Logo"&gt;
        graphpe.Medium
      &lt;/div&gt;
    &lt;/h3&gt;
&lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;



&lt;div class="ltag__link"&gt;
  &lt;a href="https://graphpe.medium.com/25-advanced-bash-commands-every-linux-user-should-know-393455b2ded6" class="ltag__link__link" rel="noopener noreferrer"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmiro.medium.com%2Fv2%2Fresize%3Afill%3A88%3A88%2F1%2AzMbYz7ccvNTjb7TNuHHBZA.jpeg" alt="Oliver Bennet"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://graphpe.medium.com/25-advanced-bash-commands-every-linux-user-should-know-393455b2ded6" class="ltag__link__link" rel="noopener noreferrer"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;25 Advanced Bash Commands Every Linux User Should Know | by Oliver Bennet | Nov, 2024 | Medium&lt;/h2&gt;
      &lt;h3&gt;Oliver Bennet ・ &lt;time&gt;Nov 8, 2024&lt;/time&gt; ・ 
      &lt;div class="ltag__link__servicename"&gt;
        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fassets.dev.to%2Fassets%2Fmedium-f709f79cf29704f9f4c2a83f950b2964e95007a3e311b77f686915c71574fef2.svg" alt="Medium Logo"&gt;
        graphpe.Medium
      &lt;/div&gt;
    &lt;/h3&gt;
&lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;



&lt;div class="ltag__link"&gt;
  &lt;a href="https://graphpe.medium.com/top-10-sed-use-cases-every-linux-user-should-know-9951f28b6b60" class="ltag__link__link" rel="noopener noreferrer"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmiro.medium.com%2Fv2%2Fresize%3Afill%3A88%3A88%2F1%2AzMbYz7ccvNTjb7TNuHHBZA.jpeg" alt="Oliver Bennet"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://graphpe.medium.com/top-10-sed-use-cases-every-linux-user-should-know-9951f28b6b60" class="ltag__link__link" rel="noopener noreferrer"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Top 10 SED Use Cases Every Linux User Should Know | by Oliver Bennet | Nov, 2024 | Medium&lt;/h2&gt;
      &lt;h3&gt;Oliver Bennet ・ &lt;time&gt;Nov 5, 2024&lt;/time&gt; ・ 
      &lt;div class="ltag__link__servicename"&gt;
        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fassets.dev.to%2Fassets%2Fmedium-f709f79cf29704f9f4c2a83f950b2964e95007a3e311b77f686915c71574fef2.svg" alt="Medium Logo"&gt;
        graphpe.Medium
      &lt;/div&gt;
    &lt;/h3&gt;
&lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;



&lt;div class="ltag__link"&gt;
  &lt;a href="https://graphpe.medium.com/linux-aliases-you-didnt-know-you-needed-part-2-e78770cc2bf8" class="ltag__link__link" rel="noopener noreferrer"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmiro.medium.com%2Fv2%2Fresize%3Afill%3A88%3A88%2F1%2AzMbYz7ccvNTjb7TNuHHBZA.jpeg" alt="Oliver Bennet"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://graphpe.medium.com/linux-aliases-you-didnt-know-you-needed-part-2-e78770cc2bf8" class="ltag__link__link" rel="noopener noreferrer"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Linux Aliases You Didn’t Know You Needed: Practical Shortcuts for Every User | by Oliver Bennet | Nov, 2024 | Medium&lt;/h2&gt;
      &lt;h3&gt;Oliver Bennet ・ &lt;time&gt;Nov 15, 2024&lt;/time&gt; ・ 
      &lt;div class="ltag__link__servicename"&gt;
        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fassets.dev.to%2Fassets%2Fmedium-f709f79cf29704f9f4c2a83f950b2964e95007a3e311b77f686915c71574fef2.svg" alt="Medium Logo"&gt;
        graphpe.Medium
      &lt;/div&gt;
    &lt;/h3&gt;
&lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  Recent Videos
&lt;/h2&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/Fh7i3fvVFfA?start=220"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/TTNbQtR9s1I?start=1490"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/oIFoVLyRWVg"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>prometheus</category>
      <category>opensource</category>
      <category>monitoring</category>
      <category>webdev</category>
    </item>
    <item>
      <title>🎉 Dive into Python 3.13: New Features, JIT Compiler, Free threading &amp; Installation Guide! 🎉</title>
      <dc:creator>Oliver Bennet</dc:creator>
      <pubDate>Tue, 12 Nov 2024 13:00:44 +0000</pubDate>
      <link>https://dev.to/graphpe/dive-into-python-313-new-features-jit-compiler-free-threading-installation-guide-2i6h</link>
      <guid>https://dev.to/graphpe/dive-into-python-313-new-features-jit-compiler-free-threading-installation-guide-2i6h</guid>
      <description>&lt;h2&gt;
  
  
  Introduction:
&lt;/h2&gt;

&lt;p&gt;Hey, &lt;strong&gt;Python enthusiasts!&lt;/strong&gt; The long-awaited Python 3.13 release has arrived, and it brings a host of exciting changes, from a Just-In-Time (JIT) compiler and free-threading support to a more interactive interpreter. In my latest video, I go over all the essential new features and also walk through the installation process for both Windows and Ubuntu.&lt;/p&gt;

&lt;p&gt;Check out the video here: &lt;a href="https://youtu.be/Fh7i3fvVFfA" rel="noopener noreferrer"&gt;Python 3.13 Features &amp;amp; Installation Guide&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What’s New in Python 3.13?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Python 3.13 introduces several game-changing updates:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Free-threading Support (PEP 703)&lt;/strong&gt; – Experimental support to run Python without the Global Interpreter Lock (GIL).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Just-In-Time (JIT) Compiler (PEP 744)&lt;/strong&gt; – A basic JIT compiler, currently disabled by default, but laying the groundwork for future performance boosts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enhanced Error Messages&lt;/strong&gt; – Python’s interactive interpreter and error handling have leveled up, now with colorized tracebacks for easy debugging.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Library Improvements&lt;/strong&gt; – Expect a streamlined standard library, with several legacy modules officially removed (PEP 594).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Improved Interactive Interpreter&lt;/strong&gt; – Inspired by the PyPy project, the REPL now includes multiline editing, history browsing, and colorized prompts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step-by-Step Installation for Windows &amp;amp; Ubuntu&lt;/strong&gt;&lt;br&gt;
If you’re eager to try Python 3.13, &lt;a href="https://youtu.be/Fh7i3fvVFfA" rel="noopener noreferrer"&gt;this video&lt;/a&gt; includes a complete installation guide for both Windows and Ubuntu. Whether you're upgrading or installing Python for the first time, follow along to set up the latest version on your system.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Watch the Full Breakdown Medium Post:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag__link"&gt;
  &lt;a href="https://graphpe.medium.com/python-3-13-is-here-ed0462885d15" class="ltag__link__link" rel="noopener noreferrer"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmiro.medium.com%2Fv2%2Fresize%3Afill%3A88%3A88%2F1%2AzMbYz7ccvNTjb7TNuHHBZA.jpeg" alt="Oliver Bennet"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://graphpe.medium.com/python-3-13-is-here-ed0462885d15" class="ltag__link__link" rel="noopener noreferrer"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Python 3.13 is here and It could be a Game Changer | Medium&lt;/h2&gt;
      &lt;h3&gt;Oliver Bennet ・ &lt;time&gt;Nov 12, 2024&lt;/time&gt; ・ 
      &lt;div class="ltag__link__servicename"&gt;
        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fassets.dev.to%2Fassets%2Fmedium-f709f79cf29704f9f4c2a83f950b2964e95007a3e311b77f686915c71574fef2.svg" alt="Medium Logo"&gt;
        graphpe.Medium
      &lt;/div&gt;
    &lt;/h3&gt;
&lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  Python 3.13 Features &amp;amp; Installation Guide
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Key Highlights Covered in the Video&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Error Message Improvements&lt;/strong&gt; – Helpful error messages for common mistakes like naming conflicts with standard modules.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;New Security Enhancements&lt;/strong&gt; – Updates in ssl and other libraries to keep your applications secure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Typing Improvements&lt;/strong&gt; – Expanded typing functionality including default values for type parameters.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deprecations and Removals&lt;/strong&gt; – Say goodbye to legacy modules like cgi, crypt, telnetlib, and more.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Whether you’re developing on Windows or Ubuntu, this video has all the insights you need to get started with Python 3.13! Check it out and let me know your thoughts in the comments below. Happy coding!&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/Fh7i3fvVFfA"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>python</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Automate Database Backup with Bash, Python, and PowerShell</title>
      <dc:creator>Oliver Bennet</dc:creator>
      <pubDate>Sat, 09 Nov 2024 07:00:00 +0000</pubDate>
      <link>https://dev.to/graphpe/automate-database-backup-with-bash-python-and-powershell-3h3h</link>
      <guid>https://dev.to/graphpe/automate-database-backup-with-bash-python-and-powershell-3h3h</guid>
      <description>&lt;p&gt;Backing up databases regularly is essential for data recovery and continuity. In this guide, we’ll automate backups for MySQL and PostgreSQL using Bash and Python, and for MSSQL with PowerShell. Each script will include scheduling options and a way to manage backup retention.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Database Clients:&lt;/strong&gt; Ensure mysql, pg_dump, and sqlcmd (or SQL 
  Server Management Objects) are installed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Permissions:&lt;/strong&gt; Ensure the script user has permissions to read 
  databases and write backups.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scheduling:&lt;/strong&gt; We’ll cover how to schedule these scripts using cron 
  for Linux and Task Scheduler for Windows.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Part 1: MySQL Backup Automation
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Method 1: Bash Script&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Bash Script for MySQL Backup:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="c"&gt;# Configuration&lt;/span&gt;
&lt;span class="nv"&gt;DB_NAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"your_database"&lt;/span&gt;
&lt;span class="nv"&gt;DB_USER&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"your_user"&lt;/span&gt;
&lt;span class="nv"&gt;DB_PASSWORD&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"your_password"&lt;/span&gt;
&lt;span class="nv"&gt;BACKUP_DIR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"/path/to/backup/dir"&lt;/span&gt;
&lt;span class="nv"&gt;TIMESTAMP&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;date&lt;/span&gt; +&lt;span class="s2"&gt;"%F"&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;
&lt;span class="nv"&gt;BACKUP_FILE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$BACKUP_DIR&lt;/span&gt;&lt;span class="s2"&gt;/&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;DB_NAME&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;_backup_&lt;/span&gt;&lt;span class="nv"&gt;$TIMESTAMP&lt;/span&gt;&lt;span class="s2"&gt;.sql"&lt;/span&gt;

&lt;span class="c"&gt;# MySQL Dump Command&lt;/span&gt;
mysqldump &lt;span class="nt"&gt;-u&lt;/span&gt; &lt;span class="nv"&gt;$DB_USER&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt;&lt;span class="nv"&gt;$DB_PASSWORD&lt;/span&gt; &lt;span class="nv"&gt;$DB_NAME&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;$BACKUP_FILE&lt;/span&gt;

&lt;span class="c"&gt;# Compression (optional)&lt;/span&gt;
&lt;span class="nb"&gt;gzip&lt;/span&gt; &lt;span class="nv"&gt;$BACKUP_FILE&lt;/span&gt;

&lt;span class="c"&gt;# Log completion&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"MySQL Backup for &lt;/span&gt;&lt;span class="nv"&gt;$DB_NAME&lt;/span&gt;&lt;span class="s2"&gt; completed: &lt;/span&gt;&lt;span class="nv"&gt;$BACKUP_FILE&lt;/span&gt;&lt;span class="s2"&gt;.gz"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Save this script as &lt;code&gt;mysql_backup.sh&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Make it executable:&lt;/strong&gt; &lt;code&gt;chmod +x mysql_backup.sh&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Add to cron for daily backups at midnight:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0 0 * * * /path/to/mysql_backup.sh &amp;gt;&amp;gt; /path/to/backup/logs/backup.log 2&amp;gt;&amp;amp;1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Method 2: Python Script&lt;br&gt;
Python Script for MySQL Backup:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;subprocess&lt;/span&gt;

&lt;span class="c1"&gt;# Configuration
&lt;/span&gt;&lt;span class="n"&gt;DB_NAME&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;your_database&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;DB_USER&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;your_user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;DB_PASSWORD&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;your_password&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;BACKUP_DIR&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/path/to/backup/dir&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;TIMESTAMP&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;now&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;strftime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;%Y-%m-%d&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;BACKUP_FILE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;BACKUP_DIR&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;DB_NAME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;_backup_&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;TIMESTAMP&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;.sql&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# MySQL Dump Command
&lt;/span&gt;&lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;mysqldump -u &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;DB_USER&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; -p&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;DB_PASSWORD&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;DB_NAME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; &amp;gt; &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;BACKUP_FILE&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;subprocess&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;call&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;command&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;shell&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Optional compression
&lt;/span&gt;&lt;span class="n"&gt;subprocess&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;call&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gzip&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;BACKUP_FILE&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;MySQL backup for &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;DB_NAME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; completed: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;BACKUP_FILE&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;.gz&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;- Run as a cron job similar to the Bash script:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0 0 * * * python3 /path/to/mysql_backup.py &amp;gt;&amp;gt; /path/to/backup/backup.log 2&amp;gt;&amp;amp;1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Part 2: PostgreSQL Backup Automation
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Method 1: Bash Script&lt;br&gt;
Bash Script for PostgreSQL Backup:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="c"&gt;# Configuration&lt;/span&gt;
&lt;span class="nv"&gt;DB_NAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"your_database"&lt;/span&gt;
&lt;span class="nv"&gt;DB_USER&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"your_user"&lt;/span&gt;
&lt;span class="nv"&gt;BACKUP_DIR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"/path/to/backup/dir"&lt;/span&gt;
&lt;span class="nv"&gt;TIMESTAMP&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;date&lt;/span&gt; +&lt;span class="s2"&gt;"%F"&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;
&lt;span class="nv"&gt;BACKUP_FILE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$BACKUP_DIR&lt;/span&gt;&lt;span class="s2"&gt;/&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;DB_NAME&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;_backup_&lt;/span&gt;&lt;span class="nv"&gt;$TIMESTAMP&lt;/span&gt;&lt;span class="s2"&gt;.sql"&lt;/span&gt;

&lt;span class="c"&gt;# PostgreSQL Dump Command&lt;/span&gt;
&lt;span class="nv"&gt;PGPASSWORD&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"your_password"&lt;/span&gt; pg_dump &lt;span class="nt"&gt;-U&lt;/span&gt; &lt;span class="nv"&gt;$DB_USER&lt;/span&gt; &lt;span class="nv"&gt;$DB_NAME&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;$BACKUP_FILE&lt;/span&gt;

&lt;span class="c"&gt;# Compression (optional)&lt;/span&gt;
&lt;span class="nb"&gt;gzip&lt;/span&gt; &lt;span class="nv"&gt;$BACKUP_FILE&lt;/span&gt;

&lt;span class="c"&gt;# Log completion&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"PostgreSQL Backup for &lt;/span&gt;&lt;span class="nv"&gt;$DB_NAME&lt;/span&gt;&lt;span class="s2"&gt; completed: &lt;/span&gt;&lt;span class="nv"&gt;$BACKUP_FILE&lt;/span&gt;&lt;span class="s2"&gt;.gz"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Save as &lt;code&gt;postgres_backup.sh&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Set cron job:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0 0 * * * /path/to/postgres_backup.sh &amp;gt;&amp;gt; /path/to/backup/backup.log 2&amp;gt;&amp;amp;1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;strong&gt;Method 2: Python Script&lt;br&gt;
Python Script for PostgreSQL Backup:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;subprocess&lt;/span&gt;

&lt;span class="c1"&gt;# Configuration
&lt;/span&gt;&lt;span class="n"&gt;DB_NAME&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;your_database&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;DB_USER&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;your_user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;BACKUP_DIR&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/path/to/backup/dir&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;TIMESTAMP&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;now&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;strftime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;%Y-%m-%d&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;BACKUP_FILE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;BACKUP_DIR&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;DB_NAME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;_backup_&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;TIMESTAMP&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;.sql&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# PostgreSQL Dump Command
&lt;/span&gt;&lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;PGPASSWORD=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;your_password&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt; pg_dump -U &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;DB_USER&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;DB_NAME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; &amp;gt; &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;BACKUP_FILE&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;subprocess&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;call&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;command&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;shell&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Optional compression
&lt;/span&gt;&lt;span class="n"&gt;subprocess&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;call&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gzip&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;BACKUP_FILE&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;PostgreSQL backup for &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;DB_NAME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; completed: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;BACKUP_FILE&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;.gz&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Schedule with cron:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0 0 * * * python3 /path/to/postgres_bkp.py &amp;gt;&amp;gt; /path/to/backup/backup.log 2&amp;gt;&amp;amp;1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Part 3: MSSQL Backup Automation with PowerShell
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;PowerShell Script for MSSQL Backup:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Configuration&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nv"&gt;$serverName&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"your_server"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nv"&gt;$dbName&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"your_database"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nv"&gt;$backupDir&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"C:\path\to\backup\dir"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nv"&gt;$timestamp&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Get-Date&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Format&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"yyyy-MM-dd"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nv"&gt;$backupFile&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$backupDir&lt;/span&gt;&lt;span class="s2"&gt;\&lt;/span&gt;&lt;span class="nv"&gt;$dbName&lt;/span&gt;&lt;span class="se"&gt;`_&lt;/span&gt;&lt;span class="s2"&gt;backup_&lt;/span&gt;&lt;span class="nv"&gt;$timestamp&lt;/span&gt;&lt;span class="s2"&gt;.bak"&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="c"&gt;# SQL Backup Command&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;Invoke-Sqlcmd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-ServerInstance&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$serverName&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Query&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"BACKUP DATABASE [&lt;/span&gt;&lt;span class="nv"&gt;$dbName&lt;/span&gt;&lt;span class="s2"&gt;] TO DISK = N'&lt;/span&gt;&lt;span class="nv"&gt;$backupFile&lt;/span&gt;&lt;span class="s2"&gt;' WITH NOFORMAT, NOINIT, NAME = '&lt;/span&gt;&lt;span class="nv"&gt;$dbName&lt;/span&gt;&lt;span class="s2"&gt;-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10"&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="c"&gt;# Optional compression with 7-Zip (if installed)&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"C:\Program Files\7-Zip\7z.exe"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$backupFile&lt;/span&gt;&lt;span class="s2"&gt;.zip"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$backupFile&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;Remove-Item&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$backupFile&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="n"&gt;Write-Output&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"MSSQL Backup for &lt;/span&gt;&lt;span class="nv"&gt;$dbName&lt;/span&gt;&lt;span class="s2"&gt; completed: &lt;/span&gt;&lt;span class="nv"&gt;$backupFile&lt;/span&gt;&lt;span class="s2"&gt;.zip"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Save as &lt;code&gt;mssql_backup.ps1&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Schedule with Windows Task Scheduler:
Create a new task, set the action to run powershell.exe with the script path as an argument.
Set the schedule (e.g., daily at midnight).&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Backup Retention Policy
&lt;/h2&gt;

&lt;p&gt;To avoid running out of storage, consider setting a retention policy to delete backups older than a specified number of days.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bash Command:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;find /path/to/backup/dir &lt;span class="nt"&gt;-type&lt;/span&gt; f &lt;span class="nt"&gt;-mtime&lt;/span&gt; +30 &lt;span class="nt"&gt;-name&lt;/span&gt; &lt;span class="s2"&gt;"*.gz"&lt;/span&gt; &lt;span class="nt"&gt;-exec&lt;/span&gt; &lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="o"&gt;{}&lt;/span&gt; &lt;span class="se"&gt;\;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;PowerShell Command:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$backupDir = "C:\path\to\backup\dir"
Get-ChildItem -Path $backupDir -Filter "*.zip" | Where-Object { $_.LastWriteTime -lt (Get-Date).AddDays(-30) } | Remove-Item
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add these commands to the end of each script or as separate scheduled tasks to keep backup directories clean and organized.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;With these scripts, you’ll have a reliable way to automatically back up &lt;strong&gt;MySQL&lt;/strong&gt;, &lt;strong&gt;PostgreSQL&lt;/strong&gt;, and &lt;strong&gt;MSSQL&lt;/strong&gt; databases, reducing the risk of data loss. Remember to test the backups regularly to ensure data integrity and be ready to restore when needed!&lt;/p&gt;

&lt;p&gt;🔗 &lt;strong&gt;Support my Work&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;▶️ &lt;a href="https://www.youtube.com/@graphpe?sub_confirmation=1" rel="noopener noreferrer"&gt;Support by Subscribing my YouTube&lt;/a&gt;&lt;br&gt;
▶️ &lt;a href="https://graphpe.com/" rel="noopener noreferrer"&gt;Explore more open-source tutorials on my website&lt;/a&gt;&lt;br&gt;
▶️ &lt;a href="https://x.com/obennetgpe" rel="noopener noreferrer"&gt;Follow me on X&lt;/a&gt;&lt;br&gt;
☕ &lt;a href="https://buymeacoffee.com/graphpe" rel="noopener noreferrer"&gt;Buy me a Coffee&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Learn Complete Bash CLI Below:&lt;/strong&gt;&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/oIFoVLyRWVg"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>bash</category>
      <category>linux</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>I Started Learning Docker a Year Ago, Now I make my Own Containers.</title>
      <dc:creator>Oliver Bennet</dc:creator>
      <pubDate>Sat, 02 Nov 2024 05:35:15 +0000</pubDate>
      <link>https://dev.to/graphpe/i-started-learning-docker-a-year-ago-now-i-make-my-own-containers-pgc</link>
      <guid>https://dev.to/graphpe/i-started-learning-docker-a-year-ago-now-i-make-my-own-containers-pgc</guid>
      <description>&lt;p&gt;In today’s tech-driven world, Docker has become a must-know technology for developers, system administrators, and anyone interested in modern software development and DevOps practices. Docker helps streamline application development by packaging code, runtime, and dependencies into portable containers, making it easier to build, test, and deploy applications across different environments.&lt;/p&gt;

&lt;p&gt;This article will cover the basics of Docker, its key concepts, and how it can transform the way you approach software development. At the end, I’ll also link to my in-depth, beginner-friendly YouTube tutorial on Docker so you can get hands-on experience with Docker's essentials. If you would like to skip and watch more like a video tutorial, Here is a video of the same. &lt;strong&gt;I personally liked this video very much as it covers Docker from an absolute layman perspective.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/TTNbQtR9s1I"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Docker?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh6elg3pse3sfdvt4vjj2.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh6elg3pse3sfdvt4vjj2.jpg" alt="Docker Containers" width="800" height="538"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Docker&lt;/strong&gt; is an open-source platform designed to automate the deployment of applications in lightweight containers. Containers allow you to bundle an application along with its dependencies, ensuring it runs consistently regardless of the environment. This solves many traditional challenges of software deployment, especially those related to compatibility and configuration issues across different systems.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Benefits of Docker:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Consistency&lt;/strong&gt;: Run your app seamlessly across various environments.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Isolation&lt;/strong&gt;: Separate apps from each other and from the underlying system.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Efficiency&lt;/strong&gt;: Lightweight, requiring less overhead than traditional virtual machines.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scalability&lt;/strong&gt;: Easily replicate and scale services as demand grows.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Core Docker Concepts
&lt;/h2&gt;

&lt;p&gt;Before diving in, let's get familiar with a few core Docker concepts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Images&lt;/strong&gt;: Pre-built packages containing everything your application needs to run. Think of images as blueprints for containers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Containers:&lt;/strong&gt; Running instances of Docker images. Containers execute the actual code, but each container is isolated, ensuring stability and security.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dockerfile&lt;/strong&gt;: A file containing instructions to build Docker images automatically.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Docker Hub:&lt;/strong&gt; A public repository for sharing and finding Docker images. It hosts official and community-built images, making it easy to find images for popular applications.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Learn Docker?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Docker&lt;/strong&gt; has become essential in DevOps and microservices architecture. Whether you’re a developer working on web applications, a data scientist deploying models, or an operations engineer ensuring stability, Docker simplifies your work by encapsulating your applications and dependencies.&lt;/p&gt;

&lt;p&gt;Docker skills are increasingly in demand, as they open the door to more complex, scalable architectures like Kubernetes and other cloud-native technologies.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started with Docker: Step-by-Step Guide
&lt;/h2&gt;

&lt;p&gt;To get started, you’ll need to install Docker on your system. Here are the basic steps to follow:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install Docker:&lt;/strong&gt; Visit Docker’s official website and download the Docker Desktop version for your operating system.&lt;br&gt;
&lt;strong&gt;Run Your First Container:&lt;/strong&gt; Use the command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run hello-world
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will pull a sample image from Docker Hub and run a basic container on your system.&lt;br&gt;
&lt;strong&gt;Explore Docker Commands:&lt;/strong&gt; Familiarize yourself with commands like docker pull, docker build, docker ps, and docker stop to start managing your own containers.&lt;br&gt;
&lt;strong&gt;Create a Dockerfile:&lt;/strong&gt; This simple text file will allow you to automate the creation of Docker images and define how your applications should be built.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Watch the Full Tutorial&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
If you’re eager to dive deeper and get hands-on, check out my full Docker tutorial on YouTube. In this one-hour video, I’ll walk you through Docker installation, setting up images and containers, and understanding Docker’s core features from scratch – no prior experience required.&lt;/p&gt;

&lt;p&gt;🎥 Watch the video here: &lt;a href="https://www.youtube.com/watch?v=TTNbQtR9s1I" rel="noopener noreferrer"&gt;Docker Tutorial for Absolute Beginners&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Docker is an invaluable tool for anyone looking to modernize their development practices and streamline application deployment. By isolating applications into containers, Docker offers a flexible, scalable, and consistent way to build and deploy software across different environments. Whether you’re just starting out or looking to enhance your DevOps skill set, Docker is a technology worth mastering.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Complete DevOps Roadmap:&lt;/strong&gt; &lt;a href="https://devops.graphpe.com/roadmap" rel="noopener noreferrer"&gt;https://devops.graphpe.com/roadmap&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔗 &lt;strong&gt;Support my Work&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;▶️ &lt;a href="https://www.youtube.com/@graphpe?sub_confirmation=1" rel="noopener noreferrer"&gt;Support by Subscribing my YouTube&lt;/a&gt;&lt;br&gt;
▶️ &lt;a href="https://graphpe.com/" rel="noopener noreferrer"&gt;Explore more open-source tutorials on my website&lt;/a&gt;&lt;br&gt;
▶️ &lt;a href="https://x.com/obennetgpe" rel="noopener noreferrer"&gt;Follow me on X&lt;/a&gt;&lt;br&gt;
☕ &lt;a href="https://buymeacoffee.com/graphpe" rel="noopener noreferrer"&gt;Buy me a Coffee&lt;/a&gt;&lt;/p&gt;

</description>
      <category>docker</category>
      <category>containers</category>
      <category>devops</category>
      <category>beginners</category>
    </item>
    <item>
      <title>10 Essential Linux Commands Every Site Reliability Engineer (SRE) Should Know</title>
      <dc:creator>Oliver Bennet</dc:creator>
      <pubDate>Tue, 29 Oct 2024 10:22:25 +0000</pubDate>
      <link>https://dev.to/graphpe/10-essential-linux-commands-every-site-reliability-engineer-sre-should-know-424g</link>
      <guid>https://dev.to/graphpe/10-essential-linux-commands-every-site-reliability-engineer-sre-should-know-424g</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In the role of a Site Reliability Engineer (SRE), knowing the right Linux commands is key to maintaining, monitoring, and troubleshooting complex systems. These commands can make everyday tasks smoother and ensure reliable system performance. Here’s a look at ten must-know commands that every SRE should keep handy.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;1. &lt;code&gt;uptime&lt;/code&gt;- System Uptime and Load&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Description:&lt;/strong&gt; Shows how long the system has been running and displays the average load.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why It’s Important:&lt;/strong&gt; Quick way to gauge system load and identify if the system is under stress.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Basic Usage:&lt;/strong&gt; &lt;code&gt;uptime&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn8bdtap4tsorz1q7uirj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn8bdtap4tsorz1q7uirj.png" alt="uptime output" width="800" height="88"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;2. &lt;code&gt;journalctl&lt;/code&gt; - System Logs Access&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Description&lt;/strong&gt;: Displays logs collected by systemd.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why It’s Important&lt;/strong&gt;: Essential for troubleshooting errors or investigating performance issues, particularly on systemd-based Linux systems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Basic Usage:&lt;/strong&gt; &lt;code&gt;journalctl -u nginx.service&lt;/code&gt; (Show logs for a specific service)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr9xer06eflxys0o7mpoh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr9xer06eflxys0o7mpoh.png" alt="journalctl output" width="800" height="174"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. &lt;code&gt;free&lt;/code&gt;- Memory Usage
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Description:&lt;/strong&gt; Displays memory usage including free, used, and cached memory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why It’s Important:&lt;/strong&gt; Crucial for detecting memory leaks or planning memory upgrades.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Basic Usage:&lt;/strong&gt; &lt;code&gt;free -h&lt;/code&gt; (Displays in human-readable format)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj9wwq4d48o5btevule94.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj9wwq4d48o5btevule94.png" alt="free -h output" width="800" height="112"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. &lt;code&gt;iostat&lt;/code&gt;- Input/Output Statistics
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Description&lt;/strong&gt;: Reports CPU and I/O statistics for devices and partitions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why It’s Important&lt;/strong&gt;: Helps to identify I/O bottlenecks and assess disk performance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Basic Usage:&lt;/strong&gt; &lt;code&gt;iostat -xz 1&lt;/code&gt; (Shows extended statistics with per-second updates)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs3bh1d80nfts0a5ygxta.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs3bh1d80nfts0a5ygxta.png" alt="iostat" width="800" height="212"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  5. &lt;code&gt;lsof&lt;/code&gt; - List Open Files
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Description&lt;/strong&gt;: Lists open files and the processes that opened them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why It’s Important:&lt;/strong&gt; Useful for identifying resource usage and finding potential file descriptor leaks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Basic Usage:&lt;/strong&gt; &lt;code&gt;lsof -i :80&lt;/code&gt; (Lists processes using port 80)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyemsofsnmv8t2ugvmxhp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyemsofsnmv8t2ugvmxhp.png" alt="lsof" width="800" height="251"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  6. &lt;code&gt;dstat&lt;/code&gt; - System Resource Statistics
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Description&lt;/strong&gt;: Combines multiple monitoring tools in one command to display CPU, disk, network, memory, and process stats.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why It’s Important:&lt;/strong&gt; Provides a real-time overview of system health, combining various metrics in one view.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Basic Usage:&lt;/strong&gt; &lt;code&gt;dstat -cdnm&lt;/code&gt; (Displays CPU, disk, network, and memory usage)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftfug2ja5cb1b0erj2orf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftfug2ja5cb1b0erj2orf.png" alt="dstat" width="800" height="231"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  7. &lt;code&gt;curl&lt;/code&gt;- Test HTTP Services
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Description&lt;/strong&gt;: Transfers data from or to a server, often used for API and HTTP testing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why It’s Important:&lt;/strong&gt; Allows you to troubleshoot and test endpoints and web services quickly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Basic Usage:&lt;/strong&gt; &lt;code&gt;curl -I http://example.com&lt;/code&gt; (Fetches HTTP headers)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6zh1b8a4sj4uisajphoq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6zh1b8a4sj4uisajphoq.png" alt="curl" width="800" height="423"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  8. &lt;code&gt;ping&lt;/code&gt; and &lt;code&gt;traceroute&lt;/code&gt;- Network Connectivity and Path Analysis
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Description&lt;/strong&gt;: ping checks connectivity to a remote host, while traceroute shows the path packets take.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why It’s Important:&lt;/strong&gt; Essential for diagnosing network issues and pinpointing connection problems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Basic Usage:&lt;/strong&gt; &lt;code&gt;ping google.com&lt;/code&gt; / &lt;code&gt;traceroute google.com&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fny7kpaxiiyc9ecifpnco.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fny7kpaxiiyc9ecifpnco.png" alt="ping" width="800" height="165"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjkss06es18nbz2yxq9x5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjkss06es18nbz2yxq9x5.png" alt="tracepath description" width="800" height="257"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  9. &lt;code&gt;sar&lt;/code&gt; - System Activity Report
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Description&lt;/strong&gt;: Collects and displays CPU, memory, network, and disk statistics.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why It’s Important:&lt;/strong&gt; Helps identify patterns and potential issues over time, especially useful for trend analysis.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Basic Usage:&lt;/strong&gt; &lt;code&gt;sar -u 1 5&lt;/code&gt; (Displays CPU usage over 5 seconds)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqm049k7s9t25animebe5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqm049k7s9t25animebe5.png" alt="sar" width="800" height="200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  10. &lt;code&gt;systemctl&lt;/code&gt;- Manage Services
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Description&lt;/strong&gt;: Controls system services, allowing you to start, stop, enable, and check service status.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why It’s Important:&lt;/strong&gt; Essential for service reliability, as it enables quick service restarts or status checks during incidents.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Basic Usage:&lt;/strong&gt; &lt;code&gt;systemctl restart nginx&lt;/code&gt; (Restart the Nginx service)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fia5wypy1g7nxn1y2bjdq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fia5wypy1g7nxn1y2bjdq.png" alt="systemctl" width="800" height="292"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;These commands are invaluable tools for SREs to monitor, manage, and troubleshoot systems effectively. Mastering them can enhance both the reliability and resilience of your infrastructure, ultimately leading to a smoother and more efficient production environment.&lt;/p&gt;

&lt;p&gt;If you would like to understand more Bash CLI and master yourself. Here is a video&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/oIFoVLyRWVg"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;🔗 &lt;strong&gt;Support my Work&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;▶️ &lt;a href="https://www.youtube.com/@graphpe?sub_confirmation=1" rel="noopener noreferrer"&gt;Support by Subscribing my YouTube&lt;/a&gt;&lt;br&gt;
▶️ &lt;a href="https://graphpe.com/" rel="noopener noreferrer"&gt;Explore more open-source tutorials on my website&lt;/a&gt;&lt;br&gt;
▶️ &lt;a href="https://x.com/obennetgpe" rel="noopener noreferrer"&gt;Follow me on X&lt;/a&gt;&lt;br&gt;
☕ &lt;a href="https://buymeacoffee.com/graphpe" rel="noopener noreferrer"&gt;Buy me a Coffee&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>cli</category>
      <category>bash</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Automating Backup and Restore Processes with Python, Bash, and PowerShell</title>
      <dc:creator>Oliver Bennet</dc:creator>
      <pubDate>Sat, 26 Oct 2024 12:30:00 +0000</pubDate>
      <link>https://dev.to/graphpe/automating-backup-and-restore-processes-with-python-bash-and-powershell-pp6</link>
      <guid>https://dev.to/graphpe/automating-backup-and-restore-processes-with-python-bash-and-powershell-pp6</guid>
      <description>&lt;p&gt;In the world of IT, backups are a lifeline. Losing critical data can bring entire systems down, leading to financial loss, customer dissatisfaction, and operational disruptions. Automated backup and restore processes are essential for protecting your data and ensuring that you can recover quickly when something goes wrong.&lt;/p&gt;

&lt;p&gt;In this Scripting Saturdays post, we’ll explore how to automate backup and restore processes using three powerful scripting languages: Python, Bash, and PowerShell. You’ll learn how to schedule backups, create custom restore points, and automate the entire process to ensure your data remains secure and recoverable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Automate Backups and Restores?
&lt;/h2&gt;

&lt;p&gt;Manual backup procedures are error-prone and can easily be overlooked, especially in environments with large amounts of data or complex infrastructure. &lt;/p&gt;

&lt;p&gt;Here are the key benefits of automating these processes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data Protection and Reliability&lt;/strong&gt;&lt;br&gt;
Regularly scheduled backups ensure that you have a recent copy of your data available at all times. Automation reduces the risk of human error, ensuring that backups happen consistently, and you’re not relying on memory or manual intervention.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Fast Recovery&lt;/strong&gt;&lt;br&gt;
Automated restore scripts make recovery faster and more predictable. In the event of a system crash, hardware failure, or data corruption, an automated restore process allows you to get back up and running with minimal downtime.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Compliance&lt;/strong&gt;&lt;br&gt;
Many industries, including finance and healthcare, have strict data retention and backup requirements. Automating backups ensures that you meet these compliance standards without the need for manual oversight.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Scalability&lt;/strong&gt;&lt;br&gt;
As your infrastructure grows, so does the complexity of managing backups. Automated solutions can scale with your environment, ensuring that each server or database is backed up regularly without extra administrative effort.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Backup Strategy: Full vs Incremental
&lt;/h2&gt;

&lt;p&gt;Before diving into the automation scripts, it’s important to understand the two main types of backups: &lt;strong&gt;Full **and **Incremental.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Full Backup:&lt;/strong&gt; A complete copy of all data. This method is more time-consuming and requires more storage space, but it provides a comprehensive restore point.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Incremental Backup:&lt;/strong&gt; Only the data that has changed since the last backup is saved. This method is faster and uses less storage space but requires all previous incremental backups to restore fully.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Depending on your needs, you can combine both strategies—running full backups weekly and incremental backups daily, for example—to balance storage and speed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Automating Backups with Python
&lt;/h2&gt;

&lt;p&gt;Python’s versatility and ease of integration with APIs make it a fantastic choice for automating backups in a wide range of environments, from simple file systems to cloud storage like AWS S3, Azure Blob, or Google Cloud Storage.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Full File Backup with Python&lt;/strong&gt;&lt;br&gt;
Let’s start with a simple example of a full file system backup, using Python to copy all files from a directory to a backup location.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import os
import shutil
import datetime

def backup_files(source_dir, backup_dir):
    # Create a timestamped directory for the backup
    timestamp = datetime.datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
    dest_dir = os.path.join(backup_dir, f"backup_{timestamp}")

    # Copy files to the backup directory
    try:
        shutil.copytree(source_dir, dest_dir)
        print(f"Backup completed successfully. Files copied to {dest_dir}")
    except Exception as e:
        print(f"Backup failed: {e}")

source_directory = "/path/to/source"
backup_directory = "/path/to/backup"

backup_files(source_directory, backup_directory)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Incremental Backup Using Python&lt;/strong&gt;&lt;br&gt;
Incremental backups in Python can be achieved by comparing timestamps of files and only copying those that have been modified since the last backup.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import os
import shutil
import time

def incremental_backup(source_dir, backup_dir, last_backup_time):
    # Create a timestamped backup directory
    timestamp = time.strftime("%Y-%m-%d_%H-%M-%S")
    dest_dir = os.path.join(backup_dir, f"incremental_backup_{timestamp}")

    if not os.path.exists(dest_dir):
        os.makedirs(dest_dir)

    # Walk through the source directory
    for root, dirs, files in os.walk(source_dir):
        for file in files:
            file_path = os.path.join(root, file)
            # Check if the file was modified after the last backup
            if os.path.getmtime(file_path) &amp;gt; last_backup_time:
                # Copy only modified files
                dest_file_path = os.path.join(dest_dir, os.path.relpath(file_path, source_dir))
                dest_file_dir = os.path.dirname(dest_file_path)
                if not os.path.exists(dest_file_dir):
                    os.makedirs(dest_file_dir)
                shutil.copy2(file_path, dest_file_path)
                print(f"Copied: {file_path}")

    print(f"Incremental backup completed to {dest_dir}")

last_backup_timestamp = time.time() - 86400  # 24 hours ago
incremental_backup("/path/to/source", "/path/to/backup", last_backup_timestamp)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Cloud Backup with Python&lt;/strong&gt;&lt;br&gt;
Python’s boto3 library allows you to back up files directly to AWS S3. Here's an example of uploading files to S3 after performing a backup.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import boto3
import os

def backup_to_s3(source_dir, bucket_name):
    s3_client = boto3.client('s3')

    for root, dirs, files in os.walk(source_dir):
        for file in files:
            file_path = os.path.join(root, file)
            s3_client.upload_file(file_path, bucket_name, file)
            print(f"Uploaded {file} to S3")

backup_to_s3("/path/to/backup", "my-s3-bucket")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Automating Backups with Bash
&lt;/h2&gt;

&lt;p&gt;For Linux users, Bash scripts offer an efficient and lightweight way to automate backup tasks. Bash is perfect for scheduling backups through cron jobs and handling system-level tasks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Full System Backup with Bash&lt;/strong&gt;&lt;br&gt;
Here’s a simple Bash script that creates a tarball of a specified directory and stores it in a backup folder with a timestamp.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/bin/bash

SOURCE_DIR="/path/to/source"
BACKUP_DIR="/path/to/backup"
TIMESTAMP=$(date +"%Y-%m-%d_%H-%M-%S")
BACKUP_FILE="$BACKUP_DIR/backup_$TIMESTAMP.tar.gz"

# Create a tarball of the source directory
tar -czf $BACKUP_FILE $SOURCE_DIR

echo "Backup completed. File saved to $BACKUP_FILE"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can schedule this script to run automatically using a cron job:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0 2 * * * /path/to/backup_script.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This cron job runs the backup script every day at 2 AM.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Incremental Backup with Bash&lt;/strong&gt;&lt;br&gt;
Bash’s rsync utility is commonly used for incremental backups, as it only copies changed files and minimizes the time and space required.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example Bash Incremental Backup Using rsync:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/bin/bash

SOURCE_DIR="/path/to/source"
BACKUP_DIR="/path/to/backup"

# Perform incremental backup using rsync
rsync -av --delete $SOURCE_DIR $BACKUP_DIR

echo "Incremental backup completed."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Automating Backups with PowerShell
&lt;/h2&gt;

&lt;p&gt;For Windows administrators, PowerShell provides a robust environment for automating backup tasks. With deep integration into the Windows operating system, PowerShell can handle both file system and system state backups.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Full File Backup with PowerShell&lt;/strong&gt;&lt;br&gt;
PowerShell can be used to automate the process of creating backups and scheduling them with Task Scheduler.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example PowerShell Script for Full Backup:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$source = "C:\path\to\source"
$backup = "C:\path\to\backup\backup_$(Get-Date -Format 'yyyy-MM-dd_HH-mm-ss').zip"

# Create a compressed ZIP file backup
Compress-Archive -Path $source -DestinationPath $backup

Write-Output "Backup completed. File saved to $backup"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Incremental Backup with PowerShell&lt;/strong&gt;&lt;br&gt;
Incremental backups can be automated using PowerShell’s ability to compare file modification times and selectively copy changed files.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example PowerShell Incremental Backup Script:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$source = "C:\path\to\source"
$backup = "C:\path\to\backup"
$lastBackup = (Get-Date).AddDays(-1)  # Check files modified in the last 24 hours

# Perform incremental backup
Get-ChildItem $source -Recurse | Where-Object { $_.LastWriteTime -gt $lastBackup } | ForEach-Object {
    $dest = Join-Path $backup $_.FullName.Substring($source.Length)
    if (!(Test-Path (Split-Path $dest))) {
        New-Item -ItemType Directory -Path (Split-Path $dest)
    }
    Copy-Item $_.FullName -Destination $dest
}

Write-Output "Incremental backup completed."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Restoring Backups
&lt;/h2&gt;

&lt;p&gt;Backing up data is only half the story. Being able to restore that data quickly is equally important. &lt;/p&gt;

&lt;p&gt;Here are scripts for restoring from the backups created in each language:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Restoring with Python&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import shutil

def restore_backup(backup_dir, restore_dir):
    shutil.copytree(backup_dir, restore_dir, dirs_exist_ok=True)
    print(f"Restore completed from {backup_dir} to {restore_dir}")

restore_backup("/path/to/backup", "/path/to/restore")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Restoring with Bash&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/bin/bash

BACKUP_FILE="/path/to/backup.tar.gz"
RESTORE_DIR="/path/to/restore"

# Extract the backup tarball
tar -xzf $BACKUP_FILE -C $RESTORE_DIR

echo "Restore completed to $RESTORE_DIR"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Restoring with PowerShell&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$backup = "C:\path\to\backup.zip"
$restore = "C:\path\to\restore"

# Extract the backup ZIP file
Expand-Archive -Path $backup -DestinationPath $restore

Write-Output "Restore completed to $restore"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Automating backup and restore processes is crucial for ensuring the safety and availability of your data. By leveraging Python, Bash, and PowerShell, you can create flexible, scalable backup solutions that protect your critical files and infrastructure. Whether you're working in a cloud environment, managing a small server, or operating a large enterprise system, automating backups will save you time, reduce risks, and help you recover from failures quickly and efficiently.&lt;/p&gt;

&lt;p&gt;Stay tuned for the next Scripting Saturdays post, where we'll cover automating server deployment with scripts!&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/oIFoVLyRWVg"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;🔗 &lt;strong&gt;Support my Work&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;▶️ &lt;a href="https://www.youtube.com/@graphpe?sub_confirmation=1" rel="noopener noreferrer"&gt;Support by Subscribing my YouTube&lt;/a&gt;&lt;br&gt;
▶️ &lt;a href="https://graphpe.com" rel="noopener noreferrer"&gt;Explore more open-source tutorials on my website&lt;/a&gt;&lt;br&gt;
▶️ &lt;a href="https://x.com/obennetgpe" rel="noopener noreferrer"&gt;Follow me on X&lt;/a&gt;&lt;br&gt;
☕ &lt;a href="https://buymeacoffee.com/graphpe" rel="noopener noreferrer"&gt;Buy me a Coffee&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>discuss</category>
      <category>devops</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Mastering Bash: Essential Commands for Everyday Use</title>
      <dc:creator>Oliver Bennet</dc:creator>
      <pubDate>Wed, 23 Oct 2024 10:32:54 +0000</pubDate>
      <link>https://dev.to/graphpe/mastering-bash-essential-commands-for-everyday-use-521k</link>
      <guid>https://dev.to/graphpe/mastering-bash-essential-commands-for-everyday-use-521k</guid>
      <description>&lt;p&gt;Bash, the Bourne Again Shell, is a powerful tool for interacting with your Linux system. Whether you're a beginner or an experienced user, mastering essential Bash commands can significantly boost your productivity. In this article, we’ll cover some of the most useful and frequently used Bash commands, with examples to help you get started.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Navigating File System with &lt;code&gt;cd&lt;/code&gt;, &lt;code&gt;pwd&lt;/code&gt;, and &lt;code&gt;ls&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;cd&lt;/code&gt;(Change Directory)&lt;/strong&gt;&lt;br&gt;
The &lt;code&gt;cd&lt;/code&gt;command is used to navigate through the file system. You can move between directories easily with this command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd /path/to/directory
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To go back to the previous directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd -
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;pwd&lt;/code&gt;(Print Working Directory)&lt;br&gt;
If you ever get lost in the terminal and want to know where you are, use &lt;code&gt;pwd&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pwd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It prints the full path of your current directory.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ls&lt;/code&gt;(List Directory Contents)&lt;br&gt;
Want to see what files and directories are inside the current directory? Use &lt;code&gt;ls&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ls
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To display more details, such as file permissions, size, and modification date, use the &lt;code&gt;-l&lt;/code&gt; flag:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ls -l
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Managing Files with &lt;code&gt;cp&lt;/code&gt;, &lt;code&gt;mv&lt;/code&gt;, and &lt;code&gt;rm&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;cp&lt;/code&gt;(Copy Files or Directories)&lt;br&gt;
The &lt;code&gt;cp&lt;/code&gt;command is used to copy files or directories from one location to another:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cp file1.txt /path/to/destination/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To copy a directory and its contents, use the &lt;code&gt;-r&lt;/code&gt; (recursive) option:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cp -r /path/to/source/ /path/to/destination/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;code&gt;mv&lt;/code&gt;(Move or Rename Files)&lt;/strong&gt;&lt;br&gt;
The &lt;code&gt;mv&lt;/code&gt; command can either move files to a new location or rename them:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mv oldfile.txt newfile.txt  # Renames file
mv file.txt /new/location/  # Moves file to new directory
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;code&gt;rm&lt;/code&gt;(Remove Files or Directories)&lt;/strong&gt;&lt;br&gt;
To delete files, use the &lt;code&gt;rm&lt;/code&gt;command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rm file.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For directories and their contents, use the &lt;code&gt;-r&lt;/code&gt; option:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rm -r /path/to/directory/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Be careful when using rm, as deleted files are not moved to a trash bin.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  3. Viewing and Editing Files with &lt;code&gt;cat&lt;/code&gt;, &lt;code&gt;less&lt;/code&gt;, and &lt;code&gt;nano&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;cat&lt;/code&gt;(Concatenate and Display Files)&lt;/strong&gt;&lt;br&gt;
The cat command displays the content of a file directly in the terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat file.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To concatenate multiple files and display them, list all files:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat file1.txt file2.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;code&gt;less&lt;/code&gt;(View File Content One Page at a Time)&lt;/strong&gt;&lt;br&gt;
The less command lets you view large files page by page, making navigation easier:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;less largefile.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can scroll through the file using arrow keys and press q to quit.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;nano&lt;/code&gt; (Simple Text Editor)&lt;/strong&gt;&lt;br&gt;
For quick file editing, &lt;code&gt;nano&lt;/code&gt;is a lightweight and user-friendly command-line text editor:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nano file.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once you're done editing, press Ctrl + X to exit, Y to save changes, and Enter to confirm.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Searching with &lt;code&gt;grep&lt;/code&gt;and &lt;code&gt;find&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;grep&lt;/code&gt;(Search Within Files)&lt;/strong&gt;&lt;br&gt;
The &lt;code&gt;grep&lt;/code&gt;command searches for a specific pattern within files. For example, to search for the word "error" in a log file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;grep "error" logfile.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To ignore case sensitivity, add the &lt;code&gt;-i&lt;/code&gt; option:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;grep -i "error" logfile.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;code&gt;find&lt;/code&gt;(Search for Files or Directories)&lt;/strong&gt;&lt;br&gt;
To locate files or directories on your system, use the &lt;code&gt;find&lt;/code&gt;command. For example, to search for a file named document.txt:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;find / -name "document.txt"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;find&lt;/code&gt;command is powerful and can be combined with other options to search by date, size, or file type.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Viewing System Information with &lt;code&gt;df&lt;/code&gt;, &lt;code&gt;du&lt;/code&gt;, and &lt;code&gt;top&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;df&lt;/code&gt; (Disk Free Space)&lt;br&gt;
The df command displays the amount of available disk space on file systems:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;df -h
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;-h&lt;/code&gt; option shows the output in a human-readable format (KB, MB, GB).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;du&lt;/code&gt; (Disk Usage)&lt;/strong&gt;&lt;br&gt;
If you need to know how much space a directory is using, &lt;code&gt;du&lt;/code&gt;can help:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;du -sh /path/to/directory/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command provides a summary of the directory’s size.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;top&lt;/code&gt;(Monitor System Processes)&lt;/strong&gt;&lt;br&gt;
The &lt;code&gt;top&lt;/code&gt;command gives you a real-time view of running processes and their resource usage:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;top
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can monitor CPU, memory usage, and even kill processes directly from this interface.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frwa21is0sqx2lgl6qds9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frwa21is0sqx2lgl6qds9.png" alt="Output of  raw `top` endraw " width="800" height="725"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;These essential Bash commands are your gateway to mastering the Linux command line. By practicing these commands and incorporating them into your daily workflow, you’ll become more efficient and capable of handling system tasks with ease. Bash is vast and powerful, and this guide is just the start of your journey into command-line mastery.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/oIFoVLyRWVg"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;🔗 &lt;strong&gt;Support my Work&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;▶️ &lt;a href="https://www.youtube.com/@graphpe?sub_confirmation=1" rel="noopener noreferrer"&gt;Support by Subscribing my YouTube&lt;/a&gt;&lt;br&gt;
▶️ &lt;a href="https://graphpe.com/" rel="noopener noreferrer"&gt;Explore more open-source tutorials on my website&lt;/a&gt;&lt;br&gt;
▶️ &lt;a href="https://x.com/obennetgpe" rel="noopener noreferrer"&gt;Follow me on X&lt;/a&gt;&lt;br&gt;
☕ &lt;a href="https://buymeacoffee.com/graphpe" rel="noopener noreferrer"&gt;Buy me a Coffee&lt;/a&gt;&lt;/p&gt;

</description>
      <category>bash</category>
      <category>linux</category>
      <category>discuss</category>
      <category>ubuntu</category>
    </item>
    <item>
      <title>DevOps Fun Facts That Will Make You LOL (or at Least Smirk!) 😂</title>
      <dc:creator>Oliver Bennet</dc:creator>
      <pubDate>Fri, 18 Oct 2024 13:22:24 +0000</pubDate>
      <link>https://dev.to/graphpe/devops-fun-facts-that-will-make-you-lol-or-at-least-smirk-55dp</link>
      <guid>https://dev.to/graphpe/devops-fun-facts-that-will-make-you-lol-or-at-least-smirk-55dp</guid>
      <description>&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DevOps: Where Everything is ‘Automated’… Until It’s Not!&lt;/strong&gt; 🤖💥&lt;br&gt;
Sure, automation makes life easier—until you forget that one little script, and suddenly everything breaks at 3 a.m.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;99% Uptime? More Like 99% Keeping Fingers Crossed&lt;/strong&gt; 🤞&lt;br&gt;
Ever notice that “99% uptime” feels more like 99% praying that nothing crashes right before the weekend?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Real DevOps Pipeline: Coffee In, Code Out&lt;/strong&gt; ☕➡️💻&lt;br&gt;
Let’s be real—coffee is the true CI/CD pipeline. Without it, nothing gets deployed!&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyls1yflpu81ffwmdwkzt.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyls1yflpu81ffwmdwkzt.jpeg" alt="Fingers crossed" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;“It Works on My Machine!” - The DevOps Battle Cry&lt;/strong&gt; 🛠️🔥&lt;br&gt;
The number one excuse for every bug ever. Too bad production didn’t get the memo about your machine.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DevOps: Bridging the Gap Between “It Should Work” and “Why Isn’t It Working?”&lt;/strong&gt; 🌉&lt;br&gt;
DevOps is like being the peacemaker between developers and operations, only with more firefighting involved. 🧑‍🚒&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Automation: Making It Easier to Break Things Faster!&lt;/strong&gt; 💨💻💣&lt;br&gt;
Automation’s great until you accidentally automate a mistake across every server in record time. Oops!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Server's Down? Just Turn It Off and On Again… Virtually&lt;/strong&gt; 🖥️🔄&lt;br&gt;
The most advanced DevOps solutions are surprisingly similar to what your grandma does with her Wi-Fi router.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;▶️ Check out my Videos on Youtube:&lt;a href="https://www.youtube.com/@graphpe?sub_confirmation=1" rel="noopener noreferrer"&gt;Youtube&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;▶️ Explore more open-source tutorials on my website:&lt;a href="https://graphpe.com" rel="noopener noreferrer"&gt;https://graphpe.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;▶️ Follow me on X for updates:&lt;a href="https://x.com/obennetgpe" rel="noopener noreferrer"&gt;X&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;▶️ Check out my articles on dev.to:&lt;a href="https://dev.to/oliverbennet"&gt;Dev.to&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;☕ Buy me a Coffee Here: &lt;a href="https://buymeacoffee.com/graphpe" rel="noopener noreferrer"&gt;Coffee&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>webdev</category>
      <category>devto</category>
    </item>
    <item>
      <title>Python's Integer Precision is Infinite</title>
      <dc:creator>Oliver Bennet</dc:creator>
      <pubDate>Tue, 01 Oct 2024 09:34:31 +0000</pubDate>
      <link>https://dev.to/graphpe/pythons-integer-precision-is-infinite-420h</link>
      <guid>https://dev.to/graphpe/pythons-integer-precision-is-infinite-420h</guid>
      <description>&lt;p&gt;In most programming languages, integers are limited by the system architecture (e.g., 32-bit or 64-bit), meaning they can only hold numbers up to a certain size. However, in &lt;strong&gt;Python&lt;/strong&gt;, integers have &lt;strong&gt;unlimited precision&lt;/strong&gt;. This means you can handle incredibly large numbers without worrying about overflow.&lt;/p&gt;

&lt;p&gt;For example, you can calculate huge numbers like factorials or perform astronomical calculations without hitting a limit:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;gt;&amp;gt;&amp;gt; 999999999999999999999999999999999 ** 100&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Python handles this gracefully, returning the massive result as expected. This flexibility makes Python ideal for fields requiring large-scale numerical computations, like cryptography or scientific computing!&lt;/p&gt;

&lt;p&gt;Oliver | &lt;a href="https://graphpe.com" rel="noopener noreferrer"&gt;www.graphpe.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>trivia</category>
      <category>facts</category>
    </item>
    <item>
      <title>Step by Step Guide: How to Install Grafana on Ubuntu 24.04</title>
      <dc:creator>Oliver Bennet</dc:creator>
      <pubDate>Mon, 30 Sep 2024 13:43:31 +0000</pubDate>
      <link>https://dev.to/graphpe/step-by-step-guide-how-to-install-grafana-on-ubuntu-2404-199a</link>
      <guid>https://dev.to/graphpe/step-by-step-guide-how-to-install-grafana-on-ubuntu-2404-199a</guid>
      <description>&lt;p&gt;Hello devs, I have created a step by Guide on &lt;a href="https://graphpe.com/step-by-step-guide-how-to-install-grafana-on-ubuntu-24-04-noble-numbat/" rel="noopener noreferrer"&gt;How to Install Grafana on Ubuntu 24.04&lt;/a&gt;. Please have a look at it and let me know your feedback. &lt;/p&gt;

&lt;p&gt;Also, a simple video tutorial here!!!&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/H8OSDHn3qWM"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>ubuntu</category>
      <category>grafana</category>
      <category>installation</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
