owncloud / ocis

:atom_symbol: ownCloud Infinite Scale Stack
https://doc.owncloud.com/ocis/next/
Apache License 2.0
1.37k stars 181 forks source link

[Feature Request] `ocis backup` command #6559

Open switchupcb opened 1 year ago

switchupcb commented 1 year ago

Feature Request: ocis backup

Is your feature request related to a problem? Please describe.

Backups in ownCloud Infinite Scale (oCIS) are currently entrusted to third-party implementations based on https://doc.owncloud.com/ocis/next/maintenance/b-r/backup.html.

"Making a backup of the Infinite Scale instance is an important task that should be done on a regular basis. This ensures that in case of issues, data can be restored from a backup."

Given the importance of backups, this feature request aims to implement a feature that makes backup and restoration of an oCIS instance straightforward for end users.

Describe the solution you'd like

Develop an ocis backup command line tool that creates a backup of the oCIS instance and its extensions.

Example: Budibase

Budibase maintains a backup tool in the Budibase CLI called budi backups. This command line interface tool lets the users completely backup and restore their self-hosted Budibase installation.

Implementation

This feature request is focused on the implementation of an ocis command that lets the user backup and restore the following oCIS instance data:

As a result, there is only a need to maintain a Backup extension if you wish to provide a User Interface (UI) that can be used to initiate backups and recovery.

Command Line Interface

The command line interface tool should be able to create and restore a single backup. Then, users can run this tool on a schedule using Crontab (Linux, MacOS) or Windows Task Scheduler (Windows) to perform automated backups of the oCIS instance.

These "oCIS backups" can be backed up to another system using another tool (e.g., Restic), but this behavior is outside the scope of this feature request.

Describe alternatives you've considered

Additional Context

Extensions

A backup service (extension) can be developed to allow end users to also backup extension data with ocis backup. However, streamlining the backup of extension data — which may involve backing up other storage solutions — requires the implementation of a standardized backup algorithm and oCIS configuration method.

A straightforward manner of backing up extension data for the end user involves the following steps:

  1. End user installs extension using an extension marketplace (which performs the installation steps listed in #6503).
  2. End user runs ocis backup ... to backup the oCIS instance, which also runs the installed extensions' backup scripts.

For the installed extensions' backup scripts to work, the following steps must be completed:

  1. The oCIS extension has declared a backup script and communicated to oCIS where it is located (via configuration files).
  2. The oCIS extension has declared where the file location output of the backup script is located.
  3. The ocis backup command runs the script and includes the oCIS extension backup file output in the oCIS instance backup file output.

Resources

I am willing to develop an implementation for the ocis backup command line interface tool for sponsorship or salary. Otherwise, this feature request is published in an Open Source Software environment, available to all for implementation.

micbar commented 4 months ago

@switchupcb Can you post any new information regarding that topic?

switchupcb commented 2 months ago

@micbar What do you need information about?

switchupcb commented 2 months ago

Oh, https://github.com/owncloud/ocis/issues/5351?

This feature request is only concerned with the creation of a "command line tool that creates a backup of the oCIS instance and its extensions."

However that is implemented is up to the person who implements it.