[owncloud-devel] OCC-command "files:cleanup" not operating as expected

Alfred van Hoorn email at alfredvanhoorn.nl
Fri Aug 28 17:12:34 GMT 2015


Hi,

2) The messages are going very fast on my screen during "files:scan 
--all". I  don't think I saw non-existing users.
I am running OC 8.1.1.
As you asked I attached a entry of a file which doesn't exist from a 
user which is deleted (also in oc_users). The path starts with the 
deleted users's root.

Cheers,
Alfred

------ Origineel bericht ------
Van: "Vincent Petry" <pvince81 at owncloud.com>
Aan: "Alfred van Hoorn" <email at alfredvanhoorn.nl>; "List for Developers 
of ownCloud" <devel at owncloud.org>
Verzonden: 28-8-2015 18:37:48
Onderwerp: Re: [owncloud-devel] OCC-command "files:cleanup" not 
operating as expected

>Hi,
>
>1) Not sure what the "stat" problem is.
>@Icewind1991 do you have an idea ?
>
>2) Did you see the files:scan --all command scan non-existing users ?
>
>Are you running OC 8.1.1 or an older version ?
>Can you post how one of such entry looks like, does its path start with
>"/$user/files/" or does the path start at the user's root ?
>
>Cheers,
>
>Vincent
>
>On 28.08.2015 18:26, Alfred van Hoorn wrote:
>>  Hi,
>>
>>  As you suggested I ran "files:scan --all" (on my Synology Diskstation
>>  where ownCloud is installed). There are two issues which I do not
>>  understand:
>>
>>  1) While the "files:scan" is running I got many, many times the
>>  following message. I do not know what it means and I don't know if
>>  this eventually leads to problems/errors (in the database tables):
>>
>>            stat: invalid option -- 'c'
>>            BusyBox v1.16.1 (2015-06-29 18:12:44 CST) multi-call 
>>binary.
>>
>>            Usage: stat [OPTIONS] FILE...
>>
>>            Display file (default) or filesystem status
>>
>>            Options:
>>                    -f      Display filesystem status
>>                    -L      Follow links
>>                    -t      Display info in terse form
>>
>>  2) After running "files:scan --all" I found entries in the
>>  oc_filecache database-table (for directories, subdirectories and
>>  files) from users which are already deleted (also in the table
>>  oc_users). This seems to me as a bug. What can I do about it?
>>
>>  In advance thanks for your reply.
>>
>>  Cheers,
>>  Alfred
>>
>>
>>  ------ Origineel bericht ------
>>  Van: "Alfred van Hoorn" <email at alfredvanhoorn.nl>
>>  Aan: "Vincent Petry" <pvince81 at owncloud.com>; "List for Developers of
>>  ownCloud" <devel at owncloud.org>
>>  Verzonden: 28-8-2015 15:29:59
>>  Onderwerp: Re[2]: [owncloud-devel] OCC-command "files:cleanup" not
>>  operating as expected
>>
>>>  Thanks for your explanation: it is perfectly clear now!! I will give
>>>  it a try.
>>>
>>>  Cheers,
>>>  Alfred
>>>
>>>  ------ Origineel bericht ------
>>>  Van: "Vincent Petry" <pvince81 at owncloud.com>
>>>  Aan: "Alfred van Hoorn" <email at alfredvanhoorn.nl>; "List for
>>>  Developers of ownCloud" <devel at owncloud.org>
>>>  Verzonden: 28-8-2015 15:19:10
>>>  Onderwerp: Re: [owncloud-devel] OCC-command "files:cleanup" not
>>>  operating as expected
>>>
>>>>  Hi,
>>>>
>>>>  1) "./occ files:scan --all" will not touch existing valid files if 
>>>>they
>>>>  already have entries in oc_filecache.
>>>>  However it should remove files from oc_filecache that don't exist 
>>>>any
>>>>  more on disk.
>>>>  If on disk there are new files, it will add them to oc_filecache.
>>>>  So your shares will stay.
>>>>
>>>>  2) files:scan does NOT delete oc_storages entries. If you have old
>>>>  unused entries you can delete them manually and rerun occ 
>>>>files:clean
>>>>  afterwards.
>>>>
>>>>  Cheers,
>>>>
>>>>  Vincent
>>>>
>>>>  On 28.08.2015 14:58, Alfred van Hoorn wrote:
>>>>>   I got your point. Then I have two addiotional questions:
>>>>>   1) Will I loose my shared links with the "files:scan -all"
>>>>>   2) The oc_storages table have several entries to external 
>>>>>storages
>>>>>   (dropbox and google drive) with are no longer actual/valid. Will
>>>>>   files:scan delete that entries too and if not, can I delete these
>>>>>   entries manually without problems?
>>>>>
>>>>>
>>>>>   ------ Origineel bericht ------
>>>>>   Van: "Vincent Petry" <pvince81 at owncloud.com>
>>>>>   Aan: "Alfred van Hoorn" <email at alfredvanhoorn.nl>; "List for
>>>>>   Developers of ownCloud" <devel at owncloud.org>
>>>>>   Verzonden: 28-8-2015 14:01:06
>>>>>   Onderwerp: Re: [owncloud-devel] OCC-command "files:cleanup" not
>>>>>   operating as expected
>>>>>
>>>>>>   files:clean is for entries that have no matching entry in
>>>>>>  oc_storages.
>>>>>>
>>>>>>   What you're looking for is probably "files:scan --all".
>>>>>>
>>>>>>   On 28.08.2015 12:55, Alfred van Hoorn wrote:
>>>>>>>   I use OC several years now and upgraded several times from
>>>>>>>  version 6
>>>>>>>   to version 8.1.1 (on this moment). Great piece of software!!
>>>>>>>
>>>>>>>   In the database table oc_filecache I find very much entries to
>>>>>>>  files
>>>>>>>   that no longer exist in the data-directory. So I used the "php 
>>>>>>>occ
>>>>>>>   files:cleanup" command.
>>>>>>>   As a result I got: "0 orphaned file cache entries deleted". The
>>>>>>>   database table oc_filechache seems to be unchanged.
>>>>>>>
>>>>>>>   Is this normal behaviour (and do I have the wrong expectations) 
>>>>>>>or
>>>>>>>   is this a bug? How can I cleanup the filecache or isn't this
>>>>>>>  nessecary?
>>>>>>>
>>>>>>>   Thanks for the reply
>>>>>>>
>>>>>>>
>>>>>>>   _______________________________________________ Devel mailing 
>>>>>>>list
>>>>>>>
>>>>>>>  
>>>>>>>Devel at owncloud.orghttp://mailman.owncloud.org/mailman/listinfo/devel
>>>>>>
>>>>
>>>>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Entry ownCloud oc_filecache.jpg
Type: image/jpeg
Size: 25356 bytes
Desc: not available
URL: <http://mailman.owncloud.org/pipermail/devel/attachments/20150828/1a92cb57/attachment-0001.jpg>


More information about the Devel mailing list