Compare commits
4 Commits
ba0d08a89e
...
0654476cf0
| Author | SHA1 | Date | |
|---|---|---|---|
| 0654476cf0 | |||
| f4d79ff568 | |||
| 0643209039 | |||
| 96134eab9d |
@ -43,5 +43,6 @@ If the issue is specific to a particular LTO version that you cannot test, pleas
|
||||
If you have any questions or need further assistance, feel free to reach out:
|
||||
|
||||
- **Email**: [maksym.sadovnychyy@gmail.com](mailto:maksym.sadovnychyy@gmail.com)
|
||||
- **Reddit**: [MaksIT.LTO.Backup: A Simplified CLI Tool for Windows LTO Tape Backups](https://www.reddit.com/r/MaksIT/comments/1ghgbx5/maksitltobackup_a_simplified_cli_tool_for_windows/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button)
|
||||
|
||||
Thank you for considering contributing, and feel free to reach out if you have questions! Your support helps make MaksIT.LTO.Backup better for everyone.
|
||||
|
||||
88
README.md
88
README.md
@ -25,49 +25,50 @@ A C# application designed to facilitate backup and restore operations to an LTO
|
||||
```
|
||||
2. Ensure `.NET8 SDK` is installed on your system.
|
||||
3. Prepare a `configuration.json` file in the application directory with the following structure:
|
||||
```json
|
||||
{
|
||||
"TapePath": "\\\\.\\Tape0",
|
||||
"WriteDelay": 100,
|
||||
"Backups": [
|
||||
{
|
||||
"Name": "Normal test",
|
||||
"Barcode": "",
|
||||
"LTOGen": "LTO5",
|
||||
"Source": {
|
||||
"LocalPath": {
|
||||
"Path": "F:\\LTO\\Backup"
|
||||
}
|
||||
},
|
||||
"Destination": {
|
||||
"LocalPath": {
|
||||
"Path": "F:\\LTO\\Restore"
|
||||
}
|
||||
|
||||
```json
|
||||
{
|
||||
"TapePath": "\\\\.\\Tape0",
|
||||
"WriteDelay": 100,
|
||||
"Backups": [
|
||||
{
|
||||
"Name": "Normal test",
|
||||
"Barcode": "",
|
||||
"LTOGen": "LTO5",
|
||||
"Source": {
|
||||
"LocalPath": {
|
||||
"Path": "F:\\LTO\\Backup"
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": "Network test",
|
||||
"Barcode": "",
|
||||
"LTOGen": "LTO5",
|
||||
"Source": {
|
||||
"RemotePath": {
|
||||
"Path": "\\\\nassrv0001.corp.maks-it.com\\data-1\\Users",
|
||||
"PasswordCredentials": {
|
||||
"Username": "",
|
||||
"Password": ""
|
||||
},
|
||||
"Protocol": "SMB"
|
||||
}
|
||||
},
|
||||
"Destination": {
|
||||
"LocalPath": {
|
||||
"Path": "F:\\LTO\\Restore"
|
||||
}
|
||||
"Destination": {
|
||||
"LocalPath": {
|
||||
"Path": "F:\\LTO\\Restore"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
},
|
||||
{
|
||||
"Name": "Network test",
|
||||
"Barcode": "",
|
||||
"LTOGen": "LTO5",
|
||||
"Source": {
|
||||
"RemotePath": {
|
||||
"Path": "\\\\nassrv0001.corp.maks-it.com\\data-1\\Users",
|
||||
"PasswordCredentials": {
|
||||
"Username": "",
|
||||
"Password": ""
|
||||
},
|
||||
"Protocol": "SMB"
|
||||
}
|
||||
},
|
||||
"Destination": {
|
||||
"LocalPath": {
|
||||
"Path": "F:\\LTO\\Restore"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
@ -150,8 +151,15 @@ Below is an example configuration setup for an LTO-6 tape generation backup oper
|
||||
|
||||
Errors during backup or restore are caught and logged to the console. Ensure that your `TapeDeviceHandler` is correctly configured and that the tape drive is accessible.
|
||||
|
||||
## Contact
|
||||
|
||||
If you have any questions or need further assistance, feel free to reach out:
|
||||
|
||||
- **Email**: [maksym.sadovnychyy@gmail.com](mailto:maksym.sadovnychyy@gmail.com)
|
||||
- **Reddit**: [MaksIT.LTO.Backup: A Simplified CLI Tool for Windows LTO Tape Backups](https://www.reddit.com/r/MaksIT/comments/1ghgbx5/maksitltobackup_a_simplified_cli_tool_for_windows/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button)
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under the terms of the GPLv2. See the [LICENSE](./LICENSE) file for full details.
|
||||
|
||||
© Maksym Sadovnychyy (MAKS-IT) 2024
|
||||
© Maksym Sadovnychyy (MAKS-IT) 2024
|
||||
17
src/dotnet_build_script.bat
Normal file
17
src/dotnet_build_script.bat
Normal file
@ -0,0 +1,17 @@
|
||||
@echo off
|
||||
|
||||
:: Set PowerShell script path
|
||||
set SCRIPT_PATH="%~dp0dotnet_build_script.ps1"
|
||||
|
||||
:: Check if PowerShell script exists
|
||||
if not exist %SCRIPT_PATH% (
|
||||
echo PowerShell script not found: %SCRIPT_PATH%
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:: Execute PowerShell script
|
||||
PowerShell -NoProfile -ExecutionPolicy Bypass -File %SCRIPT_PATH%
|
||||
|
||||
:: Pause to keep the window open
|
||||
echo.
|
||||
pause
|
||||
39
src/dotnet_build_script.ps1
Normal file
39
src/dotnet_build_script.ps1
Normal file
@ -0,0 +1,39 @@
|
||||
# Define project path
|
||||
$projectPath = "./YourProject.csproj"
|
||||
|
||||
# List of runtime identifiers for self-contained deployments
|
||||
$runtimes = @(
|
||||
"win-x64"
|
||||
)
|
||||
|
||||
# Define build configurations
|
||||
$configurations = @(
|
||||
"Release"
|
||||
)
|
||||
|
||||
# Output directory
|
||||
$outputDir = "./build_outputs"
|
||||
|
||||
# Clean output directory if exists, then recreate it
|
||||
if (Test-Path -Path $outputDir) {
|
||||
Remove-Item -Recurse -Force -Path $outputDir
|
||||
}
|
||||
New-Item -ItemType Directory -Path $outputDir
|
||||
|
||||
# Build "normal" binaries (framework-dependent)
|
||||
foreach ($config in $configurations) {
|
||||
$normalBinOutput = "$outputDir/normal/$config"
|
||||
dotnet publish $projectPath -c $config -o $normalBinOutput --self-contained false
|
||||
Write-Output "Built normal bin for configuration: $config"
|
||||
}
|
||||
|
||||
# Build "self-contained" binaries for multiple runtimes
|
||||
foreach ($config in $configurations) {
|
||||
foreach ($runtime in $runtimes) {
|
||||
$selfContainedOutput = "$outputDir/self-contained/$config/$runtime"
|
||||
dotnet publish $projectPath -c $config -r $runtime --self-contained true -o $selfContainedOutput
|
||||
Write-Output "Built self-contained bin for configuration: $config, runtime: $runtime"
|
||||
}
|
||||
}
|
||||
|
||||
Write-Output "Build process completed!"
|
||||
Loading…
Reference in New Issue
Block a user