dragotin / kraft

Kraft helps to handle your daily quotes and invoices in your small business.
http://volle-kraft-voraus.de
GNU General Public License v2.0
60 stars 19 forks source link

Nextcloud/ownCloud backend? #95

Open poVoq opened 3 years ago

poVoq commented 3 years ago

Would be nice if there was some easy way to connect to a Nextcloud instance for backup of the sqlite database and and documents created.

Thanks for considering :)

dragotin commented 3 years ago

That could be: From within Kraft, the user can:

Involved ownCloud APIs: WebDAV, Sharing API, evtl. Activity API to detect changes, ie if the customer uploads something.

ghost commented 3 years ago

I have it running with Seafile and symlinks.

Like:

sudo ln -s ~/kraft/ /usr/share/kraft
ln -s ~/kraft/DATABASE/kraft/ ~/.local/share

I don't know the kraft path in your distro. Maybe you need to change it.

I also have an update script. Because there were some problems so I had to set it to default before I could update it. I don't remember what it was exactly, sorry.
I'm not a dev, so there might be better ways. It's an Arch distro, so change the package manager to yours.

#!/bin/bash
# Kraft update script

## Variables
NOW="$(date +"%d-%m-%Y")"

## Backup
mkdir -p ~/Backups/Kraft/$NOW/
cp -r ~/kraft/ ~/Backups/Kraft/$NOW/

## Unlink all folder
sudo unlink /usr/share/kraft 
unlink ~/.local/share/kraft

## Install update
pikaur -S kraft

## Remove old new backup folder
sudo rm -r /usr/share/kraft.new*

## Backup new folder/version
sudo mv /usr/share/kraft /usr/share/kraft.new-$NOW

## Link your folder to default path
sudo ln -s ~/kraft/ /usr/share/kraft
ln -s ~/kraft/DATABASE/kraft/ ~/.local/share

## Check links
ls -lash /usr/share/kra* && sleep 5s
ls -lash ~/.local/share/

Might be a way as well.

noseshimself commented 3 years ago

It's looking like OwnCloud is a dead end right now; if you want to include access to something that requires more than putting data into the right place for the sync client picking it up (and thus supporting about every "cloud-based" service on the planet) (and remember that "cloud" just means "your data on someone else's computer for him to play with it") it might be time to consider NextCloud instead.

It might be a good idea to first define limits of the integration (i. e. should Kraft be able to provide full functionality without the requirement of the system its running on having Internet connectivity)

  • Create a kind of project-directory for a customer where the customer can find the docs, but also exchange images for example. In Kraft, content of that project dir would have to be visible, ie. by opening a webdav link in dolphin.

  • Store all data and configurations so that reinstalls and moves of Kraft are easy. Encryption!?

Isn't that just another way of looking at backup and archiving?

Involved ownCloud APIs: WebDAV

Let the sync client handle that

Sharing API

Let the sync client handle that

evtl. Activity API to detect changes

Let the OS (inotify) handle that

If you really want to add all the disadvantages of requiring an internet connection and from the perspective of a NextCloud user and integrator I would rather want to make use of the things that are not available offline like (access to) file versioning, communication (e. g. connecting Talk conversations and online communication to customers' data/files), federation (i. e. the global NextCloud directory), using the online office functions, Appointments, Cospend, TimeManger to record time spent on projects/clients, Deck or Notes (using the Notes API).

And if you want to take it one step further it might be time to take a look at NocoDB (https://www.nocodb.com/).

noseshimself commented 3 years ago

I don't know the kraft path in your distro. Maybe you need to change it.

I'm not a dev, so there might be better ways.

It might be worth to make the path (SAFELY) reconfigurable in Kraft itself (i. e. if the user is changing it copy existing files there).

dragotin commented 3 years ago

Apart from your assessment on ownCloud most of what you write is valid ;-)

Yes, of course we do not wanna require internet connection for Kraft - and utilizing the sync client is a good approach. I heard ownClouds should be pretty stable ;-)

Thanks for your input - I keep thinking about it - if my day job leaves me some time (hint!).