Git Product home page Git Product logo

lto-backup's Introduction

LTO-Backup

A lightweight utility to help you backup files to LTO tapes.

Task selection

Dependencies

  • dialog (terminal UI interface)
  • lsscsi (tape detection)
  • mbuffer (buffering processed data to tape to prevent shoe-shining)
  • mt-st (magnetic tape control)
  • calc (calculate size, estimate time/tape required)

Usage

git clone https://github.com/r1cebank/LTO-Backup.git && cd LTO-Backup
sudo ./backup.sh

Then follow the UI interface to select your tape devices and tape type (tape type only used to estimate required tape for backup)

Backup

After choosing a tape drive and backup source, the script will use tar and mbuffer to backup all content in the directory to tape, when the tape is full, it will eject the current tape and once new tape is loaded, back up will continue.

To check if script is waiting for tape, check the log with name task-log*

Backup will also generate file list at label-date.lst and the sha512 checksum at label-date.sha512. The sha512 checksum can be used later to verify the integrity of the entire backup.

Restore

Before restore, script will ask you about encryption and compression, make sure you remember the compression setting and encryption key before restore, these setting need to match or restore is not possible. You will also need to provide the number of tapes this restore needs, this setting is fed to mbuffer

Compression

The script defaults to use zstandard zstd for compression, the default compression level is 10.

Encryption

The script will prompt you for enabling encryption before backup, you can choose to let script generate random key or provide an encryption key. Encryption key is generated with the following command:

openssl rand 512 > encryption.key

Data Layout

The script will create two file on the first tape of the backup task, the first file will contain this script and the custom config used to backup, encryption key filename will be included as well. This is used to enable future restore without the need to cloning this project. The first file including the backup script, config can be extracted with the following command once tape is inserted and at 0 block.

sudo tar -xvf /dev/nst0 -C [your restore location]

lto-backup's People

Contributors

r1cebank avatar nplayfair avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.