Use case: I have some Tiki instances on ClearOS and I want automatic backups of different Tiki instances to various local computers for safekeeping. These are high level instructions as to how to combine Tiki Manager and Syncthing to do so. For a hosting company and its customer, this is the optimal solution: This permits a customer to delegate the hosting / management of an application while obtain automatic backups of their application and data.
At a high level:
Weaknesses:
Install each Tiki as a distinct website using sub-domains: How to set up websites on ClearOS
Good:
Bad:
Install Tiki Manager in /opt/tiki-manager/app as per https://doc.tiki.org/How-to-install-Tiki-Manager-on-ClearOS#Install_Tiki_Manager_Step_By_Step
https://doc.tiki.org/Manager#instance:backup
The Tiki Manager archive folders have the following pattern:
Check that your backup is OK, and move on to the next step
Tiki Manager will make the backups and also has a retention cycle (keep last 7 days, last 4 weeks and once per month forever)
https://doc.tiki.org/Manager#manager:setup-backups
Syntax for doing a backup of only one instance with no human interaction (let's say instance #3)
php tiki-manager instance:backup --instances=3 --no-interaction
You may want to install this in a cronjob. To do it every day at midnight, do the following.
echo '0 0 * * * cd /opt/tiki-manager/app/ ; php tiki-manager instance:backup --instances=3 --no-interaction' > /etc/cron.d/tm-instance.wikisuite.org-backup
You can install many instances of Syncthing, but there is not yet a good way to segment permissions. So it's better to create one master Syncthing user. Ex.: tikisyncthingbackup and manage all the backups from that account. Do not give that passwords to customers.
https://example.org:81/
u: tikibackupsviasyncthing
p: superstrongpassword
then visit https://example.org:81/syncthing/ (it may ask login again in basic auth)
Make sure Syncthing automatically restarts when you reboot so that you have unattended automatic backups. Just reboot to see if it's OK. If not, you need to look up the documentation for your Operating System.
Your archives will be in something like /opt/tiki-manager/app/backup/archive/1-example.org/: so sync that folder with your local computer.
Syncthing by default is set to sync multiple folders so they get to the exact same set of files and folders. So if you delete a file in one folder, the deletion is propagated. In the contexts of backups, this could cause issues. Examples:
The solution is:
Because the master server is set to "Send Only", there is no point in setting to "Staggered" (It doesn't receive any data, and thus doesn't need versioning).