An open API service indexing awesome lists of open source software.

https://github.com/aldythnahak/golang_console_backup_ms_sql_server

Console Program to run backup TABLE MS SQL SERVER
https://github.com/aldythnahak/golang_console_backup_ms_sql_server

batch-processing console-application golang goroutines sqlserver

Last synced: 7 months ago
JSON representation

Console Program to run backup TABLE MS SQL SERVER

Awesome Lists containing this project

README

          

# golang_console_backup_ms_sql_server

A console-based Go application to back up tables from a Microsoft SQL Server database.
Supports selective table backup and optional deletion after the backup completes.

---

## ๐Ÿงฉ Features

- ๐Ÿ”„ Backup individual or all tables from a specified SQL Server database
- ๐Ÿ—ƒ Save data to another MS SQL Server
- ๐Ÿงน Optionally delete tables after a successful backup
- โœ… Supports concurrent backup processing
- ๐Ÿ–ฅ Simple CLI interface for automation and scripting

---

## ๐Ÿš€ Requirements

- Go 1.18 or higher
- SQL Server 2012 or later
- Access credentials with permission to read and drop tables

---

## โš™๏ธ Configuration

Edit the configuration in `config/config.go` or via environment variables if supported.

Key values include:
- Source server & database
- Backup target server & database
- Table selection mode
- Backup location
- Flags: `isDeleteAfterBackup`, etc.

---

## ๐Ÿ“ฆ Usage

```bash
# Clone the repo
git clone https://github.com/AldythNahak/golang_console_backup_ms_sql_server.git
cd golang_console_backup_ms_sql_server

# Build or run the app
go run main.go
```
---

## ๐Ÿ“ฆ Dependencies

The following Go packages are used:
```bash
go get github.com/denisenkom/go-mssqldb
go get github.com/jmoiron/sqlx
go get golang.org/x/term
```

## ๐Ÿ“– Goal

This repository serves as a learning log, a reference for interview prep, and a contribution to the open-source learning community.

---

## ๐Ÿง‘โ€๐Ÿ’ป Author

**Aldyth Nahak**
[LinkedIn](https://linkedin.com/in/aldythnahak) | [GitHub](https://github.com/AldythNahak)

---

## โญ๏ธ Contribute or Follow

Feel free to fork, clone, or star this repo if you find it helpful!