https://github.com/zstyblik/net-bak
set of very simple scripts for backing-up OpenWRT devices over the network
https://github.com/zstyblik/net-bak
Last synced: 8 months ago
JSON representation
set of very simple scripts for backing-up OpenWRT devices over the network
- Host: GitHub
- URL: https://github.com/zstyblik/net-bak
- Owner: zstyblik
- Created: 2014-12-02T16:00:07.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-12-02T16:09:42.000Z (over 11 years ago)
- Last Synced: 2025-03-25T06:29:00.266Z (over 1 year ago)
- Language: Shell
- Size: 125 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# README file for net-bak:
net-bak is a set of very simple scripts for backing-up OpenWRT devices over
the network.
## Requirements
* ssh ~ at server
* mailx ~ at server
* tar ~ at OpenWRT node
## How-to use it
1. run ``% net-bak.sh -n mynode;`` and answer questions
2. upload user's key, files2backup.txt, net-bak-node.sh to node
3. you may test configuration either by:
3. running ``% net-bak.sh -t;`` which is going to try to connect to node
3. running ``% net-bak.sh -1 mynode;`` which is going to try to backup given node
4. set-up cron for given user
## Directory structure:
```
\
|- mynode
| `- .node
|- logs
| `- logfile-date.log
|
|- files2backup.txt
|- net-bak-node.sh
|- net-bak.sh
`- nodes2backup.txt
```
* files2backup.txt ~ files to back-up from node
* net-bak-node.sh ~ upload this script to node; executed via SSH
* net-bak.sh ~ main script executed at server
* nodes2backup.txt ~ list of names of nodes which corresponds with dir struct.
## .node file
Structure:
```shell
NODEIP='1.2.3.4'
NODEWR='n'
NODEADMIN='root@domain.tld'
```
* NODEIP ~ IP address or FQDN of the node
* NODEWR ~ whether node is running OpenWRT White Russian or not
* NODEADMIN ~ whom to contact in case of problems (unused)