kaya.git
9 months agoreadme: flock moved into util-linux long ago
Ian Kelling [Sun, 2 Mar 2025 02:02:42 +0000 (21:02 -0500)]
readme: flock moved into util-linux long ago

21 months agomore info, corrections for readme
Andrew Engelbrecht [Mon, 26 Feb 2024 17:17:47 +0000 (12:17 -0500)]
more info, corrections for readme

21 months agoMerge pull request #16 from ian-kelling/iank-project-status
Andrew Engelbrecht [Mon, 26 Feb 2024 16:52:53 +0000 (11:52 -0500)]
Merge pull request #16 from ian-kelling/iank-project-status

docs: elaborate on project status

21 months agoMerge pull request #15 from ian-kelling/iank-indent
Andrew Engelbrecht [Mon, 26 Feb 2024 16:51:52 +0000 (11:51 -0500)]
Merge pull request #15 from ian-kelling/iank-indent

minor code style improvements

21 months agoMerge pull request #14 from ian-kelling/iank-docs-init
Andrew Engelbrecht [Mon, 26 Feb 2024 16:48:20 +0000 (11:48 -0500)]
Merge pull request #14 from ian-kelling/iank-docs-init

docs: clarify how initialization works

21 months agodocs: elaborate on project status, remove alpha label.
Ian Kelling [Mon, 26 Feb 2024 02:29:07 +0000 (21:29 -0500)]
docs: elaborate on project status, remove alpha label.

21 months agominor code style improvements
Ian Kelling [Mon, 26 Feb 2024 00:57:20 +0000 (19:57 -0500)]
minor code style improvements

* Use emacs auto-indentation & document cli command to auto-indent for
  non-emacs users. Automatic indent allows for easier and consistent
  contribution.

* Add explicit true for empty case conditions. This makes it clear it
  wasn't mistakenly empty and emacs indents it more consistently.

* Set emacs config for indent level to help emacs users.

21 months agodocs: add note about repository version error
Ian Kelling [Sun, 25 Feb 2024 23:47:16 +0000 (18:47 -0500)]
docs: add note about repository version error

21 months agodocs: clarify how initialization works
Ian Kelling [Sun, 25 Feb 2024 23:16:52 +0000 (18:16 -0500)]
docs: clarify how initialization works

3 years agomove up security warning, give warning emoji
Andrew Engelbrecht [Tue, 13 Sep 2022 02:32:21 +0000 (22:32 -0400)]
move up security warning, give warning emoji

3 years agosecurity note pertaining to backup pruning
Andrew Engelbrecht [Tue, 13 Sep 2022 02:29:42 +0000 (22:29 -0400)]
security note pertaining to backup pruning

4 years agodon't treat restic warning as a failure
Andrew Engelbrecht [Mon, 25 Oct 2021 03:10:32 +0000 (23:10 -0400)]
don't treat restic warning as a failure

it's normal for files to be added and delted on the target server as
it's backing up, so don't consider warnings to be a failure in
kaya-client

4 years agodon't try to fall back to ssh password auth
Andrew Engelbrecht [Mon, 25 Oct 2021 02:35:36 +0000 (22:35 -0400)]
don't try to fall back to ssh password auth

kaya is meant to be run from a script, and it's not hard to set up ssh
keys. if ssh were to fall back to password authentication, the backup
would hang indefinately. password authentication is also less secure.

4 years agocheck for open local port before starting backup
Andrew Engelbrecht [Mon, 25 Oct 2021 02:12:34 +0000 (22:12 -0400)]
check for open local port before starting backup

this prints a more helpful info than the default restic error

4 years agomoved code out of 'else' branch
Andrew Engelbrecht [Wed, 20 Oct 2021 02:24:48 +0000 (22:24 -0400)]
moved code out of 'else' branch

the preceding 'if' statement leads to an exit, so we don't need 'else'

4 years agowe can print the failing command in kaya-client
Andrew Engelbrecht [Wed, 20 Oct 2021 02:20:33 +0000 (22:20 -0400)]
we can print the failing command in kaya-client

... because it's not in a complicated pipe. 'kaya' however cannot use
that, otherwise it will complain about 'tee' rather than 'ssh', and if
you force an error message about ssh, none of the parameters are
expanded

4 years agoreplace 'grep -v ...': with '! grep ...'
Andrew Engelbrecht [Wed, 20 Oct 2021 02:11:04 +0000 (22:11 -0400)]
replace 'grep -v ...': with '! grep ...'

the former wasn't properly checking for success or error state after
running ssh

4 years agotrap to remove temporary log file on exit
Andrew Engelbrecht [Wed, 20 Oct 2021 02:10:05 +0000 (22:10 -0400)]
trap to remove temporary log file on exit

4 years agohandle error below if no matching lines for grep
Andrew Engelbrecht [Wed, 20 Oct 2021 02:08:27 +0000 (22:08 -0400)]
handle error below if no matching lines for grep

4 years agobump the protocol version to 2
Andrew Engelbrecht [Tue, 19 Oct 2021 01:31:19 +0000 (21:31 -0400)]
bump the protocol version to 2

the API between client and server has changed, so we need the new
protocol version number.

4 years agoerror message when ssh connection is interrupted
Andrew Engelbrecht [Tue, 19 Oct 2021 01:15:54 +0000 (21:15 -0400)]
error message when ssh connection is interrupted

Older, but fairly recent, versions of OpenSSH don't report a non-zero
exit code if an SSH client process is killed with SIGTERM. This patch
checks for a success or typical error message, otherwise it raises its
own error.

4 years agosimpler catchall error message
Andrew Engelbrecht [Tue, 19 Oct 2021 01:13:36 +0000 (21:13 -0400)]
simpler catchall error message

the previous 'trap' etries are useful for debugging, but probably have
too much information for an end user

4 years agoexit if there is a missing dependency
Andrew Engelbrecht [Tue, 19 Oct 2021 00:44:27 +0000 (20:44 -0400)]
exit if there is a missing dependency

4 years agoadd underscore to variable name (for clarity)
Andrew Engelbrecht [Sun, 17 Oct 2021 17:23:49 +0000 (13:23 -0400)]
add underscore to variable name (for clarity)

the script will print a helpful error if the old variable name is used,
and so far, we're probably the only users of this script

4 years agocheck for missing settings in kaya.conf
Andrew Engelbrecht [Sun, 17 Oct 2021 17:20:15 +0000 (13:20 -0400)]
check for missing settings in kaya.conf

4 years agoCorrected capitalization of "Bash"
Andrew Engelbrecht [Sun, 17 Oct 2021 17:19:52 +0000 (13:19 -0400)]
Corrected capitalization of "Bash"

4 years agoindentation correction
Andrew Engelbrecht [Fri, 15 Oct 2021 06:33:22 +0000 (02:33 -0400)]
indentation correction

4 years agofriendlier message about .htaccess file
Andrew Engelbrecht [Fri, 15 Oct 2021 06:01:58 +0000 (02:01 -0400)]
friendlier message about .htaccess file

4 years agodocumentation changes
Andrew Engelbrecht [Fri, 15 Oct 2021 05:41:04 +0000 (01:41 -0400)]
documentation changes

including SPDX identifier for license

4 years agosend protocol version # for checking compatibility
Andrew Engelbrecht [Fri, 15 Oct 2021 05:24:12 +0000 (01:24 -0400)]
send protocol version # for checking compatibility

the protocol version number allows us to print errors about mismatched
versions if the client-server API changes in the future

4 years agoprint error message if the passwd file is missing
Andrew Engelbrecht [Fri, 15 Oct 2021 04:57:22 +0000 (00:57 -0400)]
print error message if the passwd file is missing

4 years agojust say 32 seconds
Andrew Engelbrecht [Fri, 15 Oct 2021 04:45:49 +0000 (00:45 -0400)]
just say 32 seconds

> 30 seconds could seem much longer

4 years agoonly touch .htpasswd file if it's missing
Andrew Engelbrecht [Fri, 15 Oct 2021 04:43:03 +0000 (00:43 -0400)]
only touch .htpasswd file if it's missing

the touch command is simply for creating an empty file, to enable
storing the first password hash

4 years agoset password file to mode 400 after creating it
Andrew Engelbrecht [Fri, 15 Oct 2021 04:37:25 +0000 (00:37 -0400)]
set password file to mode 400 after creating it

to discourage editing the file

4 years agoprint error messages to stderr
Andrew Engelbrecht [Fri, 15 Oct 2021 04:19:45 +0000 (00:19 -0400)]
print error messages to stderr

4 years agoverify .htpasswd every time, update it if needed
Andrew Engelbrecht [Fri, 15 Oct 2021 03:02:02 +0000 (23:02 -0400)]
verify .htpasswd every time, update it if needed

the authoritative password lives in repo-password-keep, and if the
.htpasswd file is later deleted, is missing an entry for a host, or
contains invalid information, then the right thing to do is to add /
update the entry in .htpasswd. the script now does this.

4 years agosilence a file check, like above
Andrew Engelbrecht [Fri, 15 Oct 2021 02:12:05 +0000 (22:12 -0400)]
silence a file check, like above

4 years agoneed to wait more than 30 sec after creating repos
Andrew Engelbrecht [Fri, 15 Oct 2021 02:10:37 +0000 (22:10 -0400)]
need to wait more than 30 sec after creating repos

The default reload interval on rest-server is 30 seconds, so I set the
time out to 2 seconds longer than that.

4 years agominor tweaks to kaya-usage function
Andrew Engelbrecht [Fri, 15 Oct 2021 01:39:51 +0000 (21:39 -0400)]
minor tweaks to kaya-usage function

4 years agodocumentation and style cleanup
Ian Kelling [Thu, 14 Oct 2021 13:05:04 +0000 (09:05 -0400)]
documentation and style cleanup

4 years agoupdated comment in kaya.conf
Andrew Engelbrecht [Tue, 12 Oct 2021 04:22:39 +0000 (00:22 -0400)]
updated comment in kaya.conf

there are likely many other restic wrappers

4 years agodocument and handle dependencies
Ian Kelling [Thu, 14 Oct 2021 11:42:34 +0000 (07:42 -0400)]
document and handle dependencies

4 years agoerror handling for kaya-client
Ian Kelling [Thu, 14 Oct 2021 11:42:48 +0000 (07:42 -0400)]
error handling for kaya-client

(With a rebase by Andrew. Don't print the password)

4 years agobug fix, 400 file will result in permission denied
Ian Kelling [Thu, 14 Oct 2021 11:30:27 +0000 (07:30 -0400)]
bug fix, 400 file will result in permission denied

4 years agomake default port simpler
Ian Kelling [Wed, 13 Oct 2021 21:05:56 +0000 (17:05 -0400)]
make default port simpler

4 years agoreadme: kaya.conf has no secrets, use default permissions
Ian Kelling [Wed, 13 Oct 2021 20:57:55 +0000 (16:57 -0400)]
readme: kaya.conf has no secrets, use default permissions

4 years agoreadme: more likely to succeed install instructions
Ian Kelling [Wed, 13 Oct 2021 20:57:16 +0000 (16:57 -0400)]
readme: more likely to succeed install instructions

4 years agopass ssh args in a correct safe way
Ian Kelling [Wed, 13 Oct 2021 20:25:31 +0000 (16:25 -0400)]
pass ssh args in a correct safe way

(With rebasing by Andrew. I still want to send the password over stdout
so it doesn't appear in the process list of the host or the target).

4 years agominor: consistently avoid unneded braces in conditions
Ian Kelling [Wed, 13 Oct 2021 20:09:49 +0000 (16:09 -0400)]
minor: consistently avoid unneded braces in conditions

4 years agoconsistent simpler redirect
Ian Kelling [Wed, 13 Oct 2021 20:08:39 +0000 (16:08 -0400)]
consistent simpler redirect

4 years agofix conditionals so error will be raised on failure
Ian Kelling [Wed, 13 Oct 2021 19:53:26 +0000 (15:53 -0400)]
fix conditionals so error will be raised on failure

4 years agouse local variables
Ian Kelling [Wed, 13 Oct 2021 19:52:36 +0000 (15:52 -0400)]
use local variables

4 years agofix error message
Ian Kelling [Wed, 13 Oct 2021 19:46:44 +0000 (15:46 -0400)]
fix error message

4 years agosimplify check for positive int
Ian Kelling [Wed, 13 Oct 2021 19:45:17 +0000 (15:45 -0400)]
simplify check for positive int

4 years agoimprove error handling
Ian Kelling [Wed, 13 Oct 2021 19:43:30 +0000 (15:43 -0400)]
improve error handling

(With some rebased changes by Andrew. Trying to keep password variable
from printing to stdout, and therefore potentially email).

4 years agominor: emacs auto indent
Ian Kelling [Wed, 13 Oct 2021 19:34:21 +0000 (15:34 -0400)]
minor: emacs auto indent

4 years agomore comments on security model
Andrew Engelbrecht [Tue, 12 Oct 2021 03:58:16 +0000 (23:58 -0400)]
more comments on security model

4 years agonotes on backup security
Andrew Engelbrecht [Tue, 12 Oct 2021 03:56:54 +0000 (23:56 -0400)]
notes on backup security

4 years agoupdated design / security notes in readme
Andrew Engelbrecht [Tue, 12 Oct 2021 03:50:12 +0000 (23:50 -0400)]
updated design / security notes in readme

4 years agoreorganized installation instructions
Andrew Engelbrecht [Tue, 12 Oct 2021 03:37:12 +0000 (23:37 -0400)]
reorganized installation instructions

4 years agorewording of comment
Andrew Engelbrecht [Tue, 12 Oct 2021 03:22:26 +0000 (23:22 -0400)]
rewording of comment

4 years agoremoved redundant code
Andrew Engelbrecht [Tue, 12 Oct 2021 03:21:31 +0000 (23:21 -0400)]
removed redundant code

4 years agocontributions are welcome
Andrew Engelbrecht [Tue, 12 Oct 2021 03:10:38 +0000 (23:10 -0400)]
contributions are welcome

4 years agoimprovements to info about Kaya
Andrew Engelbrecht [Tue, 12 Oct 2021 03:10:04 +0000 (23:10 -0400)]
improvements to info about Kaya

4 years agospelling corrections in readme file
Andrew Engelbrecht [Tue, 12 Oct 2021 02:18:47 +0000 (22:18 -0400)]
spelling corrections in readme file

4 years agovarious improvements to the documentation
Andrew Engelbrecht [Tue, 12 Oct 2021 02:14:13 +0000 (22:14 -0400)]
various improvements to the documentation

4 years agoremoved some redundant documentation
Andrew Engelbrecht [Tue, 12 Oct 2021 02:05:41 +0000 (22:05 -0400)]
removed some redundant documentation

4 years agoresolve a linting warning
Andrew Engelbrecht [Tue, 12 Oct 2021 01:54:01 +0000 (21:54 -0400)]
resolve a linting warning

"$@" should be stored in arrays, not strings

4 years agoAdded a README file
Andrew Engelbrecht [Tue, 12 Oct 2021 01:01:25 +0000 (21:01 -0400)]
Added a README file

4 years agochanging the default backup path for now
Andrew Engelbrecht [Tue, 12 Oct 2021 01:01:05 +0000 (21:01 -0400)]
changing the default backup path for now

4 years agobe more explicit about important file
Andrew Engelbrecht [Tue, 12 Oct 2021 01:00:38 +0000 (21:00 -0400)]
be more explicit about important file

4 years agoadd more cli parameters, breakout into functions
Andrew Engelbrecht [Mon, 11 Oct 2021 23:56:08 +0000 (19:56 -0400)]
add more cli parameters, breakout into functions

4 years agosplit some variables into a conf file
Andrew Engelbrecht [Mon, 11 Oct 2021 22:28:34 +0000 (18:28 -0400)]
split some variables into a conf file

4 years agoEarly version of Kaya, a restic backup wrapper
Andrew Engelbrecht [Mon, 11 Oct 2021 22:19:28 +0000 (18:19 -0400)]
Early version of Kaya, a restic backup wrapper

4 years agoadded GPLv3 license text
Andrew Engelbrecht [Mon, 11 Oct 2021 21:52:54 +0000 (17:52 -0400)]
added GPLv3 license text

4 years agobasic .gitignore file
Andrew Engelbrecht [Mon, 11 Oct 2021 18:58:23 +0000 (14:58 -0400)]
basic .gitignore file