Purpose of sub-directories below `data` directory / Remove backups from upgrades

I am wondering, what the purpose of each sub-directory below the data directory is and if some of them can safely be cleared as they are collecting tons of data.

In case it is somewhere described in the official docs, I happily take a link to that. But I haven’t found anything.

In my case, the data directory looks like

data
  |-- <firstname1.lastname1>
  |-- <firstname2.lastname2>
  |-- ...
  |-- <firstnameN.lastnameN>
  |-- __groupfolders
  |-- files_external
  |-- appdata_<id>
  `-- updater-<id>
        |-- downloads
        `-- backups
              |-- nextcloud-<major1>.<minor1>.<patch1>-<timestamp1>
              |-- nextcloud-<major2>.<minor2>.<patch2>-<timestamp2>
              |-- ...
              `-- nextcloud-<majorN>.<minorN>.<patchN>-<timestampN>

Quite obvious for me are the directories which store the user’s data and the group folders. No questions here. But

  • What is stored in files_external?
  • Is it safe to remove the content of downloads and backups?

It seems that the latter simply store the source code of previously downloaded Nextcloud versions and the respective backups before upgrades. As it is piling up several GB of data I would like to free the space. But I am not sure, if there are some DB entries which must be deleted as well in order to keep a consistent state. I was looking for an OCC command to remove all out-dated backups, but I didn’t find one.

The contents of updater can be removed at your discretion if you no longer need/desire backups of your pre-update state. Once an Updater run is done NC does not use/reference those again.

1 Like