Project

General

Profile

Actions

Activity #4373

open

Create a .bat File for Database Backup Automation

Added by Aswathy M G 9 months ago. Updated 9 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Start date:
10/29/2025
Due date:
% Done:

100%

Estimated time:
Planned Due Date:
10/30/2025

Description

Develop a Windows batch file (.bat) to automate the process of taking a PostgreSQL database backup. The script should:

Take a backup of the specified database using pg_dump.

Include the current date and time in the backup file name.

Store the backup file in a specific folder (e.g., D:\DB_Backup\).

Optionally compress the backup file into a .zip file.

Log the backup process with timestamps and status messages.

Technical Details:

Database: PostgreSQL

Host: 10.176.14.181

Port: 5432

Username: postgres
Password: postgres

Database Name: DigiPathoL,DCTCGlo

Backup Location: D:\DB_Backup\

Deliverables:

A working .bat file that performs the database backup automatically.

Documentation or comments within the script explaining each step.

A sample log file generated after running the script.

Actions #1

Updated by Abhirami S 9 months ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100
Actions #2

Updated by Thara S Pillai 9 months ago

  • Assignee changed from Abhirami S to Aswathy M G
  • Planned Due Date set to 10/30/2025

Ensure the backup file can successfully restore to a database.

Actions #3

Updated by Thara S Pillai 9 months ago

  • Tracker changed from Feature to Activity
Actions #4

Updated by Aswathy M G 9 months ago

  • Assignee changed from Aswathy M G to Abhirami S
Actions

Also available in: Atom PDF