Skip to content

LazyMiB/Crypto-Backup-Tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crypto backup tool

IT'S JUST A DEMONSTRATION. If you want to use it for something important, you need to conduct an audit.

Features:

  • double/triple encrypt: by zip, by gnupg, (optional) and by scrypt
  • generate hashes from given password with 2-3k rounds, it's prevent easy brute force
  • once setup: just use symlinks in backup directory
  • ready for cron: just use an env variable
  • simple for code review and modify

Dependencies:

  • bash
  • zip
  • unzip
  • gnupg
  • coreutils
  • (optional) scrypt

Usage

Options:

  • -s for use scrypt in onion

Backup

./backup.sh /dir/to/backup
# or
./backup.sh /dir/to/backup -s

Its will be save backup into backup.zip.gpg or backup.zip.gpg.scrypt.

Extract

./extract.sh backup.zip.gpg /dir/to/extract
# or
./extract.sh backup.zip.gpg.scrypt /dir/to/extract -s

Its will be extract backuped files to the given path.

Example

mkdir backup
ln -s /some/dir ./backup/somedir
ln -s /some/dir2 ./backup/somedir2
# ...
./backup.sh ./backup

Extract:

./extract backup.zip.gpg ./backup-extracted

Without prompt

export PASSWORD="your_password"

Credit

MIT License

Copyright (c) 2025 LazyMiB

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.