{"id":13732234,"url":"https://github.com/nextcloud/backup","last_synced_at":"2025-05-16T12:12:00.903Z","repository":{"id":37664533,"uuid":"86249785","full_name":"nextcloud/backup","owner":"nextcloud","description":"Backup now. Restore later.","archived":false,"fork":false,"pushed_at":"2025-05-09T00:33:28.000Z","size":9875,"stargazers_count":256,"open_issues_count":165,"forks_count":35,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-05-09T01:29:15.873Z","etag":null,"topics":["backup","hacktoberfest","nextcloud"],"latest_commit_sha":null,"homepage":"https://apps.nextcloud.com/apps/backup","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nextcloud.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-03-26T17:07:38.000Z","updated_at":"2025-05-09T00:33:32.000Z","dependencies_parsed_at":"2023-10-11T02:39:50.512Z","dependency_job_id":"43c90872-4ebe-454a-a725-97fddec4a4a1","html_url":"https://github.com/nextcloud/backup","commit_stats":{"total_commits":765,"total_committers":18,"mean_commits":42.5,"dds":0.6941176470588235,"last_synced_commit":"a15f391e3de1d68a8e06d2d147f906baccc3e72a"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextcloud%2Fbackup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextcloud%2Fbackup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextcloud%2Fbackup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextcloud%2Fbackup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nextcloud","download_url":"https://codeload.github.com/nextcloud/backup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254527099,"owners_count":22085919,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backup","hacktoberfest","nextcloud"],"created_at":"2024-08-03T02:01:50.021Z","updated_at":"2025-05-16T12:12:00.880Z","avatar_url":"https://github.com/nextcloud.png","language":"PHP","readme":"# Backup\n\nThis App creates and stores backup images of your Nextcloud.\n\n_(Documentation is still in writing)_\n\n- [Important notes](#notes)\n- [Restoring Points](#restoring-point)\n- [Hardware Requirement](#hardware)\n- [How the Backup App manage your data](#backup-manage-data)\n- [Export configuration](#export)\n- [Important details about your data](#important)\n- [Upload packed backup to External Storages](#external-storages)\n- [Quick compression during 1st pass](#zlib-chunk)\n- [AppData on External Storage](#external-appdata)\n- [Restoring a backup](#restoring)\n- [Available `occ` commands](#occ)\n- [Faq](#faq)\n- [Known issues](#known-issues)\n\n\u003ca name=\"notes\"\u003e\u003c/a\u003e\n\n## Important notes\n\n- **Read the full documentation**,\n- During the generation of the backup, the app will put your instance in `maintenance mode`,\n- This app generates a lot of data and can fill your hard drive,\n- By default, **your data are encrypted** meaning you **will need to export** the configuration of the\n  App **as soon as possible** or you will **not** be able to **decrypt your backups**.\n\n\u003ca name=\"restoring-point\"\u003e\u003c/a\u003e\n\n## Restoring Points\n\nA restoring point is an image of your Nextcloud at a specific time. A restoring point can be:\n\n- '**Full**' (or Complete) and contains a backup of :\n    * The instance of Nextcloud, its apps and `config/config.php`,\n    * A dump of the database,\n    * The local folder defined as `data` of the Nextcloud.\n\n\n- '**Partial**' (or Differential) that contains a backup of :\n    * The instance of Nextcloud, its apps and `config/config.php`:\n        * A dump of the database,\n        * Local data that have been modified/generated since the last **Full Backup**.\n\n### What data are available in a Restoring Point\n\nLet's first start with the fact that the **Backup App** will not store **ALL** data from your\nNextcloud.  \nAs an example, remote files won't be stored.\n\nThis is a list of what can be restored and what cannot be restored when using the **Backup App**:\n\nA restoring point will store:\n\n- Your current Nextcloud,\n- The configuration in `config/config.php`,\n- The `apps/` folder and any other `custom_apps/`,\n- Your local `data/`, defined by `'datadirectory'` in `config/config.php`,\n- A full `sqldump` of your database,\n- List of files and localisation within the backup,\n- Metadata about the instance.\n\nA restoring point will **NOT** store:\n\n- Data from External Storages, even if the mounted filesystem is available locally.\n\n### Metadata\n\nEach Restoring Point includes a file named `restoring-point.data` that contains metadata about the\nbackup:\n\n- Version of your Nextcloud,\n- The ID of the parent backup in case of partial backup,\n- The list of data file that compose the restoring point, the format for this data depends on the current\n  status of the restoring point (packed/unpacked) and the settings (compression, encryption),\n- Absolute paths for each data file,\n- Checksum for each file of the backup itself,\n- The date of the restoring point,\n- Comments,\n- Information related to the health of the files during the last check.\n\nWhile the file `restoring-point.data` is require to confirm the integrity of all files and parts of the\nbackup, it is still possible to generate a restoring point based on the available files. However :\n\n- There is no way to confirm the integrity of the restoring point,\n- The restoring process will require some knowledge from the admin about the original infrastructure from\n  The original instance that generated the backup.\n\n**Generate Metadata from backup files**\n\n- Upload the files of your restoring point on your instance of Nextcloud with the Backup App installed,\n  in a **specific** folder in your Files,\n- At the root of this **specific** folder, create a file named `restoring-point.data` with this content:\n\n       {\"action\": \"generate\", \"id\": \"20211023234222-full-TFTBQewCEdcQ3cS\"}\n\n- Customize your `id`; while it is advised to use the correct **Id** of the **Restoring Point** (if\n  known), any string would work. If kept empty, a new **Id** will be generated using the current time,\n\n- Right-click the file `restoring-point.data` and select `Scan Backup Folder`.\n\nAfter few seconds, the metadata file will be generated and stored within the same `restoring-point.data`\nitself.\n\n\u003ca name=\"hardware\"\u003e\u003c/a\u003e\n\n## Hardware requirement\n\n- **Diskspace**: Creating and storing backups require a lot, **a lot**, of disk-space,\n\n\n- **AES Hardware Acceleration**: If your processor does not\n  support [AES instruction set](https://en.wikipedia.org/wiki/AES_instruction_set), the encryption\n  process will fall back to `aes-256-cbc`.  \n  This should only affect you if using the Backup App to migrate your instance from an AES-supporting CPU\n  to a non-AES-supporting CPU (ie. old arm proc). Enforcing the use of `aes-256-cbc` before the packing\n  of the restoring point on a AES-supporting CPU will fix this:\n\n    - Run: `./occ config:app:set backup force_cbc --value '1' `,\n    - Pack the restoring point: `./occ backup:point:pack \u003cpointId\u003e`.\n\n\u003ca name=\"backup-manage-data\"\u003e\u003c/a\u003e\n\n## Configure the handle of your data\n\n### The timing\n\nFrom the **Admin Settings**/**Backup** page, you can configure the time slot and the rate for the\ngeneration of your future backups:\n\n![Settings Schedule](screenshots/settings_schedule.png)\n\nThe time slot define the time of the day the Backup App might run its **1st pass** to generate a backup,\nit is based on the local time on the server.\n\nKeep in mind that, when generating a new backup, your instance will be in `maintenance mode` for the full\nduration of the **1st pass**. This is the reason why, by default, **Full Backup** will only be started\nduring the week-end, while **Partial Backup** are also run during week days.\n\nIf you scroll down to the bottom of this page, you can have an estimation of the date for your next\nbackup based on your settings:\n\n![Settings Next Point](screenshots/settings_next_point.png)\n\n### The first pass (the backup process)\n\nDuring the **First Pass**, data are quickly stored in the `appdata` folder of the **Backup App**.   \nAt this point, there is no compression nor encryption; the first pass needs to be as fast as possible to\nrelease the `maintenance mode` on the instance.   \nThe data are stored in a list of zip files (named `chunk`), each one with a maximum size of 4GB (unless\nit contains a file bigger than 4GB).\n\nBecause there is no compression during the first pass, the `appdata` folder of the **Backup App** will\nrequire at least the same size of your current setup of Nextcloud: the content of the `core`, its `apps`\nand `local data`.\n\nBy default, the `appdata` folder of the Backup App is located in the same folder than the rest of the\ndata of your instance defined in `datadirectory`. It is estimated that the `Backup App` needs 65% of the\navailable diskspace of the `datadirectory`\n\nIn case there is not enough space, you can:\n\n- [Mount an External Storage](#external-appdata) and move the `appdata` folder of the **Backup app**\n  there.\n\n\u003c!---\n- [add a quick compression](#zlib-chunk) during the 1st pass.\n--\u003e\n\n### The second pass (the packing process)\n\nThe second pass does not require to put your instance in `maintenance mode`. The 2nd pass consist in the\npacking of the restoring point and eventually its upload on external storage.\n\nYou can configure the type of packing in the Admin Settings of the app:\n\n![Settings Packing](screenshots/settings_packing.png)\n\nThe packing will list each `chunk` of your backup and:\n\n- Compress them (if enabled),\n- Split the result in multiple files (named `part`) of 100MB,\n- Encrypt each `part` (if enabled),\n- Once completed without issue, remove the original zip file of the `chunk` to free space.\n\n\u003ca name=\"handle-external-storages\"\u003e\u003c/a\u003e\n\n### Storing on a different hard drive\n\nOnce packed, restoring points can be stored on a different location. Locally or remotely.\n\nif [configured](#external-storages), the Backup App will start storing your restoring points externally,\nand check their integrity every day.\n\nThe uploading process will check that each `part` of the packed restoring point are healthy, based on the\nchecksum stored in the `metadata` file and will retry to upload any faulty `part`.  \nOn top of that, the content from the `metadata` file is signed, making the Backup App able to confirm the\nfull integrity of the backup.\n\n\u003ca name=\"export\"\u003e\u003c/a\u003e\n\n## Exporting your configuration\n\n![Settings export](screenshots/settings_export.png)\n\n\u003ca name=\"important\"\u003e\u003c/a\u003e\n\n## Important details about your data\n\n- **Disk-space**: The 1st pass does not compress anything, meaning that you will need at least the\n  equivalent of currently used space by your Nextcloud as available disk-space. If you have no disk-space\n  available, you can configure the app to use\n  an [external storage to store all its data](#external-appdata).\n\n\u003c!---\n  or add a [quick compression](#zlib-compression) on the `chunks`.\n--\u003e\n\n- **Temporary Files**: during the 2nd pass (packing process), the compression and encryption require the\n  creation of temporary files. while those files are temporary and deleted when they become useless, they\n  are still available for few seconds. Meaning that the temp directory should not be shared with other\n  application.\n\n\n- **Export your setup**: If the option is not disabled, backups are encrypted with a key that is stored\n  in the database of your current instance of Nextcloud. The key is mandatory to recover any data from\n  your backups.\n\n  You can export your setup from the Admin Settings/Backup page, or using `occ`. If encrypted, the export\n  process will generate and returns its own key that will be required during the import when restoring\n  your instance. As an admin, you will need to store the export file and its key, preferably in different\n  locations.\n\n\n- **.nobackup**: The presence of a `.nobackup` file in a folder will exclude all content from the current\n  folder and its subfolders from the backup.\n\n\u003ca name=\"external-storages\"\u003e\u003c/a\u003e\n\n## Upload to External Storages\n\nUploading your packed restoring point on one (or multiple) external storages is the perfect solution when\nfacing a huge loss of data from your disk whether it is of human or hardware origin.\n\nThose external data are [fully managed](#handle-external-storages) by the app itself.\n\nThe configuration is done in 2 steps:\n\n- The first step is to setup a folder from the **External Storage** Settings Page, it is strongly adviced\n  to limit the availability of the folder to the `admin` group only:\n\n![Settings External Store](screenshots/settings_external_store.png)\n\n- The second step is done in the **Backup** Settings Page, the configured External Storage should be\n  displayed in the listing of available storage location:\n\n![Settings External Folder](screenshots/settings_external_folder.png)\n\n- Set the folder where to store your backup files on the external storage, and click on '_Add new\n  external location_'.\n\n\u003c!---\n\n\u003ca name=\"zlib-chunk\"\u003e\u003c/a\u003e\n\n## Quick compression during 1st pass\n\nIf you have limited disk-space available, you can define a compression level (from 0 to 9, with 0 means\nno compression) that will be applied to the `chunks` during the 1st pass. This will require more\nresources, meaning that the maintenance mode will be enabled for a longer period of time, depends on the\nchosen compression level.\n--\u003e\n\n\u003ca name=\"external-appdata\"\u003e\u003c/a\u003e\n\n## AppData on External Storage\n\nIf you have no disk-space available, you can configure the app to use an external storage to store all\nits data:\n\n- The data generated during the 1st pass are not encrypted, Your data leaves the internal data folder\n  from your instance and are now available on an external storage,\n- The 1st-pass will require more resources and your instance will stays in maintenance mode for a longer\n  time,\n- If your external storage is not a local folder, huge network resources will be required,\n- During the configuration, old restoring points from the previous storage will be deleted.\n\nFrom a terminal, run `./occ backup:external:appdata` and follow the instructions to select the external\nstorage and the folder.  \nFrom the **Backup** Settings Page, you can do the same:\n\n![Settings External Appdata](screenshots/settings_external_appdata.png)\n\n\u003ca name=\"restoring\"\u003e\u003c/a\u003e\n\n## Restoring a backup\n\nYou can restore a single file or the whole instance to a previous state:\n\n    ./occ backup:point:restore \u003cpointId\u003e [--file \u003cfilename\u003e] [--data \u003cdataPack\u003e] [--chunk chunkName]\n\nPlease note that you can go back to a previous backup of your instance from any version of Nextcloud\ncompatible with the Backup App. There is no need to install the exact same version as it will be reverted\nto the one used when creating the Restoring Point. Meaning that you can fully restore your instance of\nNextcloud even if you lost your harddrive, as long as you kept a copy of the Restoring Point (upload to\nanother remote instance).\n\n### Restoring my Nextcloud from scratch.\n\nIn this scenario, you have lost everything and want to fully recover your Nextcloud.\n\nThe first step would be to have a basic setup of Nextcloud+Backup:\n\n- Install a version of Nextcloud compatible with the Backup App,\n- Install the **Backup** App,\n- Import your `setup` that contains the signature and encryption keys from your previous instance. You\n  can bypass this step only if your backup are not encrypted and you do not need the ability to confirm\n  the integrity of files:\n    * `./occ backup:setup:import [--key \u003ckey\u003e] \u003c ~/backup_setup`\n- [Enable and Configure the External Storage](#upload-to-external-storages) App, if your backups are on a\n  external storage.\n\nThen, you have to add your last valid restoring points from your previous instance. Both the last\nFull-Backup and the last Partial-Backup you have in hand:\n\n- [Restoring my Nextcloud from a remote storage](#restore-remote-storage)\n- [Restoring my Nextcloud from my workstation](#restore-workstation)\n\n\u003ca name=\"restore-remote-storage\"\u003e\u003c/a\u003e\n\n### Restoring my Nextcloud from a remote storage\n\nIf your backups are on an external storage, assuming you have already configured it in both **External\nStorage** and **Backup**, your restoring points should already be available.\n\n_Note: there is a known issues that might require you to browse the root of your Nextcloud Files after\nthe creation of the external storage._\n\n- List your available restoring points:\n\n```\n$ ./occ backup:point:list\n- Retrieving data from local\n- Retrieving data from external:3\n\u003e Found RestoringPoint 20211031232710-full-Tu4H6vOtxKoLLb9\n\u003e Found RestoringPoint 20211101014009-full-QeTziynggIuaaD2\n+---------------------------------------+---------------------+--------+---------+-----------------------------+------------+--------------+--+\n| Restoring Point                       | Date                | Parent | Comment | Status                      | Instance   | Health       |  |\n+---------------------------------------+---------------------+--------+---------+-----------------------------+------------+--------------+--+\n| A 20211031232710-full-Tu4H6vOtxKoLLb9 | 2021-10-31 23:27:10 |        | beta2   | packed,compressed,encrypted | external:3 | 12H, 23M ago |  |\n|  20211101014009-full-QeTziynggIuaaD2  | 2021-11-01 01:40:09 |        |         | packed,compressed,encrypted | external:3 | 10H, 53M ago |  |\n+---------------------------------------+---------------------+--------+---------+-----------------------------+------------+--------------+--+\n```\n\n- Download the one you want to restore; if you want to restore multiple backups, it is a good idea to\n  download them all at that point:\n\n```\n$ ./occ backup:point:download 20211031232710-full-Tu4H6vOtxKoLLb9 --external 3\n\u003e downloading metadata\ncheck health status: 0 correct, 43 missing and 0 faulty files\n  * Downloading data/data-0540e4d6-9d7f-4c84-a8d8-ca40764257d1/00001-B57XWKJQe5Xg1sd: ok\n  * Downloading data/data-0540e4d6-9d7f-4c84-a8d8-ca40764257d1/00002-PXHPeS6t6OXFwkP: ok\n[...]\n```\n\n- Unpack the downloaded restoring point:\n\n```\n$ ./occ backup:point:unpack 20211031232710-full-Tu4H6vOtxKoLLb9\nUnpacking Restoring Point 20211031232710-full-Tu4H6vOtxKoLLb9\n \u003e lock and set status to unpacking\n \u003e Browsing RestoringData data\n   \u003e Unpacking RestoringChunk data-0540e4d6-9d7f-4c84-a8d8-ca40764257d1: proceeding\n     * Copying parts to temp files\n       - 00001-B57XWKJQe5Xg1sd: /tmp/phpNnYCbZ\n       - 00002-PXHPeS6t6OXFwkP: /tmp/phpYqRSPW\n[...]\n```\n\n- Start the restoring process. Please note that:\n    * For each data pack, you will be able to choose the location of the extraction, (you can bypass\n      using `--do-not-ask-data`),\n    * If a sqldump is available, you will be prompt to use the current configuration from the instance,\n      the one from the `config/config.php` freshly restored or use another database (you can bypass\n      using `--do-not-ask-sql`),\n    * If the information from the file `config/config.php` are in conflict with the path or sql settings\n      specified during the extraction, you will be notified that the restoring process wants to update\n      them:\n\n```\n$ ./occ backup:point:restore 20211031232710-full-Tu4H6vOtxKoLLb9\nRestoring Point: 20211031232710-full-Tu4H6vOtxKoLLb9\nDate: 2021-10-31 23:27:10\nChecking Health status: ok\n\n\nWARNING! You are about to initiate the complete restoration of your instance!\nAll data generated since the creation of the selected backup will be lost...\n\nYour instance will come back to a previous state from 13 hours, 17 minutes and 48 seconds ago.\n\nDo you really want to continue this operation ? (y/N) \n```\n\n\u003ca name=\"restore-workstation\"\u003e\u003c/a\u003e\n\n### Restoring my Nextcloud from my workstation\n\nIf your backups are on your workstation, you can upload them on your Nextcloud Files, on your own\nNextcloud account. Once uploaded, open the folder containing the restoring point to find the metadata\nfile `restoring-point.data`.\n\nRight-click the file `restoring-point.data` and select `Scan Backup Folder`.\n\nThe scan of the restoring will be initiated at the next tick of your crontab. The background job will\nscan the full folder and its content, copy pertinent data into the app's appdata and create a new entry\nin the database.\n\nOnce available in the listing of your available restoring points, the process will be the same as\ndescribed in [Restoring my Nextcloud from Appdata](#restore-appdata).\n\n\u003ca name=\"restore-scan\"\u003e\u003c/a\u003e\n\n### Restoring my Nextcloud from AppData\n\nAfter restoring a previous restoring point, you can face a situation where some restoring points are\navailable in your `appdata` but not displayed in the listing. This de-synchronisation can be fixed by\nrunning `./occ backup:point:scan`. This will scan your appdata and add the restoring points to your\ncurrent database.\n\nOnce available in the listing, you can have a better overview of the current status of the restoring\npoint:\n\n```\n$ ./occ backup:point:list\n+---------------------------------------+---------------------+--------+---------+-----------------------------+------------+--------------+--+\n| Restoring Point                       | Date                | Parent | Comment | Status                      | Instance   | Health       |  |\n+---------------------------------------+---------------------+--------+---------+-----------------------------+------------+--------------+--+\n| A 20211031232710-full-Tu4H6vOtxKoLLb9 | 2021-10-31 23:27:10 |        | beta2   | packed,compressed,encrypted | external:3 | 15H, 36M ago |  |\n|  20211101014009-full-QeTziynggIuaaD2  | 2021-11-01 01:40:09 |        |         | not packed                  | local      | 1H, 13M ago  |  |\n+---------------------------------------+---------------------+--------+---------+-----------------------------+------------+--------------+--+\n```\n\nIn order to restore a backup, the restoring point needs to be `not packed`, if the restoring point you\nwant to restore has the `packed` status, you will need to `unpack` it first:\n\n```\n$ ./occ backup:point:unpack 20211031232710-full-Tu4H6vOtxKoLLb9\nUnpacking Restoring Point 20211031232710-full-Tu4H6vOtxKoLLb9\n \u003e Lock and set status to unpacking\n \u003e Browsing RestoringData data\n   \u003e Unpacking RestoringChunk data-0540e4d6-9d7f-4c84-a8d8-ca40764257d1: proceeding\n     * Copying parts to temp files\n       - 00001-B57XWKJQe5Xg1sd: /tmp/phpNnYCbZ\n       - 00002-PXHPeS6t6OXFwkP: /tmp/phpYqRSPW\n[...]\n```\n\nOn your restoring point is marked as `not packed` you can proceed to the restoring. Please note that:\n\n* For each data pack, you will be able to choose the location of the extraction, (you can bypass\n  using `--do-not-ask-data`),\n* If a sqldump is available, you will be prompt to use the current configuration from the instance, the\n  one from the `config/config.php` freshly restored or use another database (you can bypass\n  using `--do-not-ask-sql`),\n* If the information from the file `config/config.php` are in conflict with the path or sql settings\n  specified during the extraction, you will be notified that the restoring process wants to update them:\n\n```\n$ ./occ backup:point:restore 20211031232710-full-Tu4H6vOtxKoLLb9\nRestoring Point: 20211031232710-full-Tu4H6vOtxKoLLb9\nDate: 2021-10-31 23:27:10\nChecking Health status: ok\n\n\nWARNING! You are about to initiate the complete restoration of your instance!\nAll data generated since the creation of the selected backup will be lost...\n\nYour instance will come back to a previous state from 13 hours, 17 minutes and 48 seconds ago.\n\nDo you really want to continue this operation ? (y/N) \n```\n\n\n\u003ca name=\"restoring-partial\"\u003e\u003c/a\u003e\n\n### Restoring part of my Nextcloud\n\n\n\u003ca name=\"occ\"\u003e\u003c/a\u003e\n\n## Available `occ` commands:\n\n### Export/Import the configuration of your app.\n\nIt is **mandatory** to export the configuration of the app as it contains the encryption keys for your\nencrypted backup and you will not be able to restore your backups from a data lost.\n\nYou can do that from the Admin Settings page or using the `occ` command:\n\n    ./occ backup:setup:export [--key] \u003e ~/backup.setup\n\nThis will create the file `~/backup.setup`.  \nWhen using the option `--key` the setup will be encrypted and an `encryption_key` will be generated and\nreturned by the occ command. This key needs to be stored somewhere and will be required to decrypt the\nsaved configuration.  \nIt is strongly (again) advised to use the `--key` option.\n\nTo restore the exported configuration:\n\n     ./occ backup:setup:import [--key encryption_key] \u003c ~/backup.setup\n\nIt is **mandatory** to export the configuration of the app as it contains the encryption keys for your\nencrypted backup and you will not be able to restore your backups from a data lost.\n\nYou can do that from the Admin Settings page or using the `occ` command:\n\n    ./occ backup:setup:export [--key] \u003e ~/backup.setup\n\nThis will create the file `~/backup.setup`.  \nWhen using the option `--key` the setup will be encrypted and an `encryption_key` will be generated and\nreturned by the occ command. This key needs to be stored somewhere and will be required to decrypt the\nsaved configuration.  \nIt is strongly (again) advised to use the `--key` option.\n\nTo restore the exported configuration:\n\n     ./occ backup:setup:import [--key encryption_key] \u003c ~/backup.setup\n\n### Manage your restoring point\n\n**Create a new Restoring Point**\n\nWhile this is managed by a background job, you can still generate a restoring point manually:\n\n    ./occ backup:point:create [--differential]\n\nThe `--differential` option will create an differential backup.\n\n**Upload a Restoring Point**\n\n    ./occ backup:point:upload \u003cpointId\u003e\n\nThis will request all configured remote instances to check the sanity of any previous upload for this\nRestoring Point, and will only upload missing/faulty file.\n\n**List restoring points**\n\n    ./occ backup:point:list\n\nYou can search and compare restoring point available locally and on configured remote instance.\n\n**Search for a specific file:**\n\n    ./occ backup:file:search [--since|--until|--point] \u003cstring\u003e\n\nSearch for a file, based on its name.\n\nExample: `./occ backup:file:search test.jpg --since 2021-09-23`\n\n**History of specific a file:**\n\n    ./occ backup:file:history [--since|--until] \u003cdataPack\u003e \u003cfullPath\u003e\n\nDisplay the history of a file.\n\nExample: `./occ backup:file:history data cult/files/backup1.md`\n\n**Import a Restoring Point**\n\nIf you start using the app, you will face at one point a situation where an important Restoring Point is\navailable somewhere but cannot be find in your database. As an example, when restoring a Backup, all\nRestoring Point created after this backup won't be in database anymore. This is normal as restoring the\nbackup fully overwrite your database. In that case, you can run this command:\n\n    ./occ backup:point:scan \u003cpointId\u003e\n\nIf it cannot be found, you will need to manually copy the folder that contains the Restoring Point in the\nappdata folder: `data/appdata_qwerty123/backup/`.\n\n**Verify integrity of a Restoring Point**\n\n    ./occ backup:point:details \u003cpointId\u003e\n\n## Exporting configuration\n\nThis is an important step of your configuration of the Backup App Some information will be needed in case\nyou start storing your backup on remote instances:\n\n- The identity of your Nextcloud,\n- The encryption key used to encrypt your backup.\n\n**While the identity can be changed and your access to the remote files can be restored by executing some\ncommand on the remote instance to update your new identity, a missing encryption key means that your\nremote backup cannot be decrypted and are totally useless.**\n\n**Please note that creating a new identity will disable the sanity check on the metadata file.**\n\n    ./occ backup:setup:export [--key] \u003e ~/backup_setup.json\n\nUsing the `--key` option will generate a Key, used to encrypt/decrypt the data of your setup. The key\ngenerated during the export of your setup needs to be stored somewhere safe!\n\n    ./occ backup:setup:import [--key \u003ckey\u003e] \u003c ~/backup_setup.json\n\n\u003ca name=\"faq\"\u003e\u003c/a\u003e\n\n## Questions ?\n\n**- Can the app be used to migrate an instance of Nextcloud ?**\n\nYes, during the restoration you can change the absolute path of your files and the configuration relative\nto the database.  \nNo, you cannot switch the type of the database server (mysql, postgres, ...).\n\nHowever, the app should not be used to duplicate setup in production as each instance will be fully\nidentical (`instanceid`, ...).\n\n\u003ca name=\"known-issues\"\u003e\u003c/a\u003e\n\n## Known issues:\n\n* When adding a new external storage from the files_external, the folder needs to be mounted using the\n  Files App. Browsing the root folder should be enough.\n","funding_links":[],"categories":["PHP"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnextcloud%2Fbackup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnextcloud%2Fbackup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnextcloud%2Fbackup/lists"}