Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ceremcem authored Jul 18, 2017
1 parent 3d19cbe commit 0210a39
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,23 @@ This toolset is intended to use with remote Linux devices (embedded or not). You

There are 2 connection modes available:

* direct : connected to remote target via local area network, a direct cable or directly over internet
* proxy : connected to remote target via a rendezvous server
* `make direct-connection` : connected to remote target directly (LAN, Internet, directly via cable)
* `make proxy-connection` : connected to remote target via a rendezvous server

# 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)
* **incremental** (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) (this is also a **disadvantage, see below**)
* **dead simple copies** of original files (you can simply copy/paste when you need to restore or move your files around)¹
* **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)

When making a backup, you can cancel at any point and resume later.

# Disadvantages

If you are not using **btrfs**, following problem will bite you:

Backups are just plain folders, which 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`**.
> ¹: If you are not using **btrfs**, following problem will bite you:
>
> Backups are just plain folders, which 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`**.
>
> If you are using `--method btrfs`, backups are made as readonly snapshots.
# Install

Expand All @@ -48,18 +46,20 @@ permissions otherwise.

# Example Usage

# First, you should prepare your target in order to `make ssh` and `make sync-root`
# without password:
./dcs-tools/make-target-settings
1. First, you should prepare your target in order to `make ssh` and `make sync-root` without password:

./dcs-tools/make-target-settings

2. Daily usage:

# REQUIRED: setup a session type
make use-[direct, proxy]-session
# REQUIRED: setup a session type
make [direct, proxy]-connection

# OPTIONS: you have several action options:
make mount-root # mounts the root folder to NODE_ROOT
make umount-root # unmount the root folder from NODE_ROOT
make ssh # makes ssh
make sync-root # sync whole root partition of target
# OPTIONS: you have several action options:
make mount-root # mounts the root folder to NODE_ROOT
make umount-root # unmount the root folder from NODE_ROOT
make ssh # makes ssh
make sync-root # sync whole root partition of target

# Tips

Expand All @@ -73,7 +73,7 @@ If you want to make it self-update on next run, remove the flag file:

If you want to run a remote command, simply pass via ARGS= parameter

make ssh ARGS='uname -a'
make ssh ARGS='uname -a'
# or
./dcs-tools/ssh-proxy uname -a
./dcs-tools/ssh-direct uname -a
Expand Down

0 comments on commit 0210a39

Please sign in to comment.