All Projects → aktos-io → dcs-tools

aktos-io / dcs-tools

Licence: other
Tools for making remote Linux node management easy

Programming Languages

shell
77523 projects
Makefile
30231 projects

Projects that are alternatives of or similar to dcs-tools

Backup And Recovery Howtos
Guides to setting up a media storage system, backing it up, and recovering from failures
Stars: ✭ 235 (+591.18%)
Mutual labels:  backup, btrfs
Btrbk
Tool for creating snapshots and remote backups of btrfs subvolumes
Stars: ✭ 605 (+1679.41%)
Mutual labels:  backup, btrfs
btrfs-backup
A simple, flexible script for versioned backups using btrfs and rsync
Stars: ✭ 59 (+73.53%)
Mutual labels:  backup, btrfs
Btrfs Sxbackup
Incremental btrfs snapshot backups with push/pull support via SSH
Stars: ✭ 105 (+208.82%)
Mutual labels:  backup, btrfs
adlibre-backup
High performance rsync backup utilising BTRFS / ZFS filesystem features
Stars: ✭ 35 (+2.94%)
Mutual labels:  backup, btrfs
BaNG
Backup Next Generation for Linux & Mac using rsync (support hardlinks and btrfs snapshots), Web-Frontend, Statistics, History-Merger)
Stars: ✭ 28 (-17.65%)
Mutual labels:  backup, btrfs
snapbtrex
snapbtrex is a small utility that keeps snapshots of btrfs filesystems and optionally send them to a remote system or syncs them locally.
Stars: ✭ 29 (-14.71%)
Mutual labels:  backup, btrfs
WindowsFileHistoryCleaner
Simple command line executable to turn a File History share back into a snapshot of files
Stars: ✭ 15 (-55.88%)
Mutual labels:  backup
ansible-role-borgbackup
No description or website provided.
Stars: ✭ 13 (-61.76%)
Mutual labels:  backup
authy-extractor
Extract 2FA tokens from Authy.
Stars: ✭ 30 (-11.76%)
Mutual labels:  backup
Automation-using-Shell-Scripts
Development Automation using Shell Scripting.
Stars: ✭ 41 (+20.59%)
Mutual labels:  backup
QQ-History-Backup
QQ聊天记录备份导出,支持无密钥导出,图片导出。无需编译有GUI界面。Backup Chating History of Instant Messaging QQ.
Stars: ✭ 300 (+782.35%)
Mutual labels:  backup
aws-utils
This repository provides utilities which are used at MiQ.
Stars: ✭ 20 (-41.18%)
Mutual labels:  backup
BackupAssistant
Backup Assistant helps you to backup your files (like database backups or log files) to FTP Server. It works on any platform. ( Windows, Linux and Mac.)
Stars: ✭ 32 (-5.88%)
Mutual labels:  backup
mup-data-backup
MongoDB backup and restore which is deployed via mup.
Stars: ✭ 27 (-20.59%)
Mutual labels:  backup
proxmox-tools
📦 A collection of stuff that I and others wrote for Proxmox 📦
Stars: ✭ 112 (+229.41%)
Mutual labels:  backup
btrfs-borg
btrfs-borg makes snapshots and backs up a btrfs snapshotted subvolumes and LXC containers using Borg
Stars: ✭ 22 (-35.29%)
Mutual labels:  btrfs
docker-vackup
Script to easily backup and restore docker volumes
Stars: ✭ 102 (+200%)
Mutual labels:  backup
fb-export
Export (most) of your Facebook data using Node.js and the Graph API.
Stars: ✭ 21 (-38.24%)
Mutual labels:  backup
cylon-deb
TUI menu driven bash shell script to update and maintain a Debian based Linux distro.
Stars: ✭ 23 (-32.35%)
Mutual labels:  backup

Description

This toolset is intended to use for managing remote Linux devices (RaspberryPi in mind, but any remote Linux system will work) from host Linux systems, by basically simplifying 6 tasks, where you need to:

  1. ..make ssh for performing remote tasks (either directly or over a link up server).
  2. ..use simple drag and drop style file transfers (by sshfs).
  3. ..backup the target's entire root filesystem (by rsync).
  4. ..create fast and efficient differential full backups (by hardlinks or by BTRFS snapshots).
  5. ..create a separate bootable system disk from any of your backups.
  6. ..clone a target with a new identity.

This simplification is achieved by:

  • Placing separate scripts for each task described above and providing a simple Makefile.
  • Keeping the scripts, configuration files and backups in a folder called your-project.

Install

Requirements

  • Linux OS
  • git (for submodule fetching and make update)
  • rsync
  • sshfs

Setup

Follow these steps for every project:

# on your host (eg. your laptop)
mkdir your-project
cd your-project
git clone --recursive https://github.com/aktos-io/dcs-tools

Configuration

Assuming you are in /path/to/your-project folder already,

  1. Create your configuration file and mandatory folders/flags:

    ./dcs-tools/setup
    
  2. (Optional): Send your RSA public key to the target in order to prevent asking password on every connection:

    ./dcs-tools/make-target-settings  
    

Usage

Set connection type

either connect to your target by its direct IP address and port:

make conn-direct

or meet with your target on a link up server (see link-with-server)

make conn-over-proxy

See doc/configuration.md for explanations.

Make ssh

make ssh

Makes ssh connection either directly or via the link up server according to your connection type.

Mount target root

make mount-root

Mounts the root folder to your-project/NODE_ROOT, which you can use for drag-n-drop style file transfers.

You can later unmount with make umount-root without using sudo command.

Sync target's root folder

make sync-root

Sync whole root partition of the target with your-project/sync-root folder. You can use this command consecutively to keep your sync-root folder up to date as much as possible. Only differentiating data will be transmitted (if any).

This command will only copy the current state of your target to your host machine. You will need to create your backups manually, with make backup-sync-root command

Create backups

make backup-sync-root

Create a backup from the sync-root folder into ./backups folder either by hardlinks method or by creating a btrfs subvolume, according to your your-project/method-* flag.

method-* flags can be set by make method-btrfs or make method-hardlinks commands.

Advanced actions:

Following tools are for advanced usage, use them with extreme caution.

Produce bootable disk from a backup

./dcs-tools/produce-bootable-disk [--help]   

Produces a bootable disk that is capable of booting your target hardware.

Restore files from a backup to physical disk

./dcs-tools/restore-from-backup [--help]

Restores all files from backup folder to the SD card. Useful when you want to update your physical backup disk with your latest sync folder.

Give New ID

Make appropriate changes to give new identity to an installation. Useful for creating a new controller/machine based on current installation.

./dcs-tools/give-new-id [--help]

See Also

Advantages

Backups have following properties:

  • portable (you can move your copies around. eg: take first backup locally, remove disk, mound on another computer, make backup-root again)
  • differential (only differences are transmitted)
  • dead simple copies of original files (you can simply copy/paste when you need to restore or move your files around) (see BIG WARNING)
  • versioned : Take any number of full backups as much as you like. You are responsible for deleting old backups.
  • efficient storage usage (if you backup your 10 GB root for 5 times, you end up using 10.2 GB disk space if you have no modified files. But you will see the snapshots folder has a size of 50 GB. (Magic? No: Hardlinks or BTRFS subvolumes)

BIG WARNING

Move your backups around carefully

If you are not using btrfs, "dead simple copies" feature has a problem by its design: As backups are just plain folders, this may lead breaking (unintentionally changing) the ownership of the files if you move/copy your files carelessly (eg. if you mv your/snapshot to/another/location and then interrupt the command in the middle, you will probably end up with moved files having root:root permissions.) That's why you SHOULD always use rsync for such movements.

If you are using --method btrfs, backups are made as readonly snapshots, so you will not have such problems.

Use correct filesystem

Make sure that you are performing make sync-root command on a native Linux filesystem. You will end up having a backup with wrong file ownership and/or permissions otherwise.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].