Backup / Recover / Uninstall Cells
We explain here how to backup and restore your instance of Pydio Cells, so that you do not loose data nor configuration in case of a disaster such as hard-drive failure, power loss, bad upgrade process, etc.
This procedure is adapted for simple mono-node installation. If you have made multi-node installation, be aware that you must backup both storage and datasource for each one of your nodes.
Backup configuration and default data location
If you have made a vanilla install, default Home folder for the Pydio Cells installation is located at:
/home/pydio/.config/pydio/cellsfor Linux users
~/Library/Application\ Support/Pydio/cellsfor MacOS users
cells folder contains all configuration.
cells folder is also the parent of the
data subfolder that contains the default datasources that are created at install. Please note that these default datasources contains in addition to the default business datasources, the hidden internal datasource that is used to store among others version files, thumbnails, etc.
So create a backup of this folder, for instance:
# If possible, it is always to stop Cells before doing the backup systemctl stop cells # Using rsync, first time will be longer and then we will only incrementally add and/or remove new files rsync -avr --delete /home/pydio/.config/pydio/cells/ /home/pydio/backups/cells
WARNING: proceed with extra care with rsync when using the
inverting source and target folders will wipe everything in the source folders...
So be careful to really use:
rsync -avr --delete <source folder> <target folder>
- We advise you to use rsync to regularly backup this folder: after first time, the followings will be quicker because it only transfers the difference.
- If you ever happen to mess with your installation without impacting the DB you can always restore this folder to your latest backup and then do a
./cells startwith a new (or a restored old) binary. You should be good to go.
- All the information about network, database and plugins configuration are stored inside the
Backup additionnal datasources
File system datasource
All file based datasources are defined by 4 things:
- the configuration that is stored in the
pydio.jsonfile (see above)
- the files that are stored in this datasource
- a related index that is stored as tables in the configured DB
- for file system based DS: a
.minio.sysfolder that is located in the parent of the DS root folder (this contains s3/minio meta data for the files)
You can find more details about datasources here.
To backup such a datasource, we must at least backup configuration (see preceding paragraph) and the files.
The index and the content of the
.minio.sys folder can be automatically restored after data restoration by running a resync from the admin interface.
You can yet safely include this folder in your backups (and it is even better).
This is the beauty and main advantage of using a S3 backend for your datasources: this system is fully decoupled from your Pydio Cells instance. You should be able to directly manage your backup policies via your S3 provider manager interface.
The configuration of this datasource is stored in the main
cells folder (see above) and is backed up and restored together with your main system.
Note the Enterprise distribution offers 2 more datasource types (Google Cloud and Azure Blob storage) that are to be backed up the same way.
Backup the database
In a vanilla single node instance, you configure a database connection at install time, usually the
cells db. In such case, you only need to backup (and restore) this single database.
To perform a backup, you can use default mysql tool that is usually installed with your DB software.
Typically on Linux:
mysqldump -u pydio -p cells > /home/pydio/backups/cells_sqldump_$(date -u +%Y-%m-%d).sql
-u <user>: defines the user to be used
-pprompts you for the mysql password
cells: your database name
> /home/pydio/backups/cells_sqldump_$(date -u +%Y-%m-%d).sqltells the tool where to store resulting data.
You might adapt these options to your use case.
Restoring the data
If you followed the above step, restoring the data is quite easy:
- Restore the
cellsparent folder (under e.g.
/home/pydio/.config/pydio/cellson Linux or
~/Library/Application\ Support/Pydio/cellson MacOS)
- Restore the database from your sql backup file: make sure to create an empty
cellswith correct owner and use the following command:
mysql -u pydio -p cells < /home/pydio/backups/cells_sqldump_<relevant_date>.sql
- Optionally restore the folders of any additional external filesystem datasources
Post restoration and before launching the app
If you recover on another server or if some of the configuration like database, URLs, IP addresses have changed, you must double check in the
pydio.json configuration file that can be found at the root of the
cells folder and adapt the values to the new one, typically:
- if hostname as changed, change
.defaults.urlInternalproperty, you might also want to check
.PeerAdressproperty of the various DS
- if public URL has changed, you have to change all occurrences of it (currently 4 in v1.4 and newer)
- if DB configuration has changed: adapt
You can then retrieve the relevant Pydio Cells binary and simply relaunch the app.
You should connect as an
admin user after first restart and check that all datasources are correctly up and running, and optionally also rerun a sync if you where not able to correctly backup and restore the index and parent
In vanilla single node setups, Pydio Cells does not put resources in multiple folders: everything is centralized in the
cells folder and in the database.
So, to remove Pydio Cells, you mainly need to remove these 2 items and the Cells binary.
To remove the folder on linux distributions you can make use of rm such as :
rm -r ~/.config/pydio/cells.
To remove the cells folder on MacOS this :
rm -r ~/Library/Application\ Support/Pydio/cells.
For macos users do not make the mistake to remove the 'Pydio' folder the sync app also stores configuration inside it.
For any additional datasource that you will not use anymore, you can clear the parent folder.
Then clean the database with this command after you have logged in mysql :
drop database cells; (or any other name if you named it).
You are then good to go: there is nothing else remaining of the previous install or of Pydio Cells in general.Back to top