3

I am trying to clean up a disk on a specific server. On that server there is only owncloud installed. Since I was not the guy who setup owncloud, and there is now way to reach the actual administrator I have to solve the issue myself.

First I thought about cleaning old backups, but I saw that the backups are taken differentially, so I can't simply delete some older files. The log is already cleared, but it didn't free enough space, so I read the manual for owncloud to check what options I have.

In the end I would love to simply gather the size used per user. But through the admin panel in owncloud this is not possible. Also the data structure won't allow me to gather this info easily. Is there a nice way of gathering the needed info? So I can pick on some guys to clean up their owncloud files ;) ?

I am running Debian using MySQL DB for OC.

RayofCommand
  • 1,451
  • 8
  • 26
  • 36
  • 1
    If you have shell access, you should be able to use the tools there (`df` mostly). – GregL Apr 26 '16 at 12:13
  • I have access, but the structure seems a bit odd to me. I found the "core" folder which seem to cotain all the user and info I need. But inside that folder I have many folders like "2016-02-21_01:00:01" or other dates. inside of these folders I see my users folders. Is OwnCloud somehow dividing the files by dates? I have a folder for every new week. – RayofCommand Apr 26 '16 at 12:22

1 Answers1

2

There is an opened issue concerning this topic: https://github.com/owncloud/core/issues/1344. It might be ready for owncloud 9.2.

For now, as PVince81 has suggested in the issue I've posted above, you can run an SQL query to see the current disc usage by user:

MariaDB [owncloud]> select m.user_id, fc.size from oc_mounts m, oc_filecache fc, oc_storages s where m.mount_point=concat('/', m.user_id, '/') and s.numeric_id=m.storage_id and fc.storage=m.storage_id and fc.name='files';
+---------+---------+
| user_id | size    |
+---------+---------+
| admin   |     163 |
| user1   | 4774179 |
| user2   | 1571107 |
+---------+---------+
3 rows in set (0.00 sec)
MatFiz
  • 121
  • 4