Skip to content

Commit

Permalink
docs: fix syntax and cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ukkopahis committed Jan 15, 2022
1 parent 6e63ba8 commit 6c84a86
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 84 deletions.
6 changes: 6 additions & 0 deletions docs/Backup-and-Restore.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ The backup command can be executed from IOTstack's menu, or from a cronjob.
To ensure that all your data is saved correctly, the stack should be brought down. This is mainly due to databases potentially being in a state that could cause data loss.

There are 2 ways to run backups:

* From the menu: `Backup and Restore` > `Run backup`
* Running the following command: `bash ./scripts/backup.sh`

Expand All @@ -21,6 +22,7 @@ The current directory of bash must be in IOTstack's directory, to ensure that it
```
./scripts/backup.sh {TYPE=3} {USER=$(whoami)}
```

* Types:
* 1 = Backup with Date
* A tarball file will be created that contains the date and time the backup was started, in the filename.
Expand All @@ -33,10 +35,12 @@ The current directory of bash must be in IOTstack's directory, to ensure that it
If this parameter is not supplied when run as root, the script will ask for the username as input

Backups:

* You can find the backups in the ./backups/ folder. With rolling being in ./backups/rolling/ and date backups in ./backups/backup/
* Log files can also be found in the ./backups/logs/ directory.

### Examples:

* `./scripts/backup.sh`
* `./scripts/backup.sh 3`

Expand All @@ -52,6 +56,7 @@ This will only produce a backup in the rollowing folder and change all the permi

## Restore
There are 2 ways to run a restore:

* From the menu: `Backup and Restore` > `Restore from backup`
* Running the following command: `bash ./scripts/restore.sh`

Expand All @@ -64,6 +69,7 @@ There are 2 ways to run a restore:
./scripts/restore.sh {FILENAME=backup.tar.gz} {noask}
```
The restore script takes 2 arguments:

* Filename: The name of the backup file. The file must be present in the `./backups/` directory, or a subfolder in it. That means it should be moved from `./backups/backup` to `./backups/`, or that you need to specify the `backup` portion of the directory (see examples)
* NoAsk: If a second parameter is present, is acts as setting the no ask flag to true.

Expand Down
3 changes: 3 additions & 0 deletions docs/Containers/MariaDB.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# MariaDB
## Source

* [Docker hub](https://hub.docker.com/r/linuxserver/mariadb/)
Expand Down Expand Up @@ -59,6 +60,8 @@ You can open a terminal session within the mariadb container via:
$ docker exec -it mariadb bash
```

To connect to the database: `mysql -uroot -p`

To close the terminal session, either:

* type "exit" and press <kbd>return</kbd>; or
Expand Down
75 changes: 0 additions & 75 deletions docs/Home.md

This file was deleted.

21 changes: 12 additions & 9 deletions docs/Updating-the-Project.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Periodically updates are made to project which include new or modified container template, changes to backups or additional features. As these are released your local copy of this project will become out of date. This section deals with how to bring your project to the latest published state.

Quick instructions:
## Quick instructions

1. backup your current settings: `cp docker-compose.yml docker-compose.yml.bak`
2. check `git status` for any local changes you may have made to project files. Save and preserve your changes by doing a commit: `git commit -a -m "local customization"`. Or revert them using: `git checkout -- path/to/changed_file`.
Expand All @@ -12,21 +12,24 @@ Quick instructions:
6. update running containers to latest: `docker-compose up --build -d`

*Troubleshooting:* if a container fails to restart after update

* try restarting the whole stack: `docker-compose restart`
* backup your stack settings: `cp docker-compose.yml docker-compose.yml.bak`
* Check log output of the failing service: `docker-compose logs *service-name*`
* try googling and fixing problems in docker-compose.yml manually.
* try googling and fixing problems in docker-compose.yml manually.
* try recreating the failing service definition using menu.sh:
* `./menu.sh`, select Build Stack, unselect the failing service, press enter
to build, and then exit.
* `./menu.sh`, select Build Stack, select the service back again, press enter
to build, and then exit.
* Try starting now: `docker-compose up -d`
* Go to the IOTStack Discord and ask for help.
1. `./menu.sh`, select Build Stack, unselect the failing service, press
enter to build, and then exit.
2. `./menu.sh`, select Build Stack, select the service back again, press
enter to build, and then exit.
3. Try starting now: `docker-compose up -d`
* Go to the [IOTStack Discord](https://discord.gg/ZpKHnks) and describe your
problem. We're happy to help.

## Details, partly outdated

**If you ran the git checkout -- 'git ls-files -m' as suggested in the old wiki entry then please check your duck.sh because it removed your domain and token**
!!! warning
If you ran `git checkout -- 'git ls-files -m'` as suggested in the old wiki entry then please check your duck.sh because it removed your domain and token

Git offers build in functionality to fetch the latest changes.

Expand Down

0 comments on commit 6c84a86

Please sign in to comment.