Deleting old "File Versions"

Ask all your questions regarding OC 5.x Please read the Support Forum Rules
Forum rules
ownCloud 5.x reached end of life and is officially unsupported. For details see Wiki page.

Please upgrade your ownCloud.
Zakoon
Starter
Posts: 97
Joined: Tue Jan 31, 2012 5:06 pm

Deleting old "File Versions"

Postby Zakoon » Fri Jan 04, 2013 4:16 pm

Hi,

if i try to delete old backup-copies (file versions) via the admin-panel, i get this error

"Something went wrong, your files may not have been expired"

What can I do about it? My Webspace is getting crowded... :?

In /owncloud/data/USERNAME/files_versions, there is a lot of stuff. Can I savely remove it via FTP? Or do I have to wait, until the "official" way is working?

Thanks & Cheers, Zak.

User avatar
RandolphCarter
ownCloud master
Posts: 5134
Joined: Wed May 30, 2012 8:42 am
ownCloud version: 8.1.1
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.5.x

Re: Deleting old "File Versions"

Postby RandolphCarter » Fri Jan 04, 2013 4:21 pm

In /owncloud/data/USERNAME/files_versions, there is a lot of stuff. Can I savely remove it via FTP? Or do I have to wait, until the "official" way is working?


It should be no problem to remove those files - if you don't mind loosing the old versions (if they even are old versions - there seems to have been a problem in the versioning, I had many duplicates of not modified files in the files_versions folder, basically simply copies of the files in the "files" folder). See also issue #1055 on github.

RealRancor
ownCloud master
Posts: 17381
Joined: Sat May 26, 2012 3:00 pm
ownCloud version: 9.0.2
Webserver: nginx
Database: MySQL
OS: Linux
PHP version: 7.0.x

Re: Deleting old "File Versions"

Postby RealRancor » Fri Jan 04, 2013 4:23 pm

Hi,

there are already some reports about this on the forums:

viewtopic.php?f=3&t=7016

and a bugreport on github:

https://github.com/owncloud/core/issues/754

Probably this will be fixed in the next release of OC. If you want to get this fixed in the current version, have a look at the changes in this pull request:

https://github.com/owncloud/core/pull/963/files
*gone*

Zakoon
Starter
Posts: 97
Joined: Tue Jan 31, 2012 5:06 pm

Re: Deleting old "File Versions"

Postby Zakoon » Fri Jan 04, 2013 4:25 pm

Thanks, good to know, that this issue is known...

I'm currently doing a backup, after this I try to delete the files via FTP. If I don't report back, everything went fine (or it went VERY bad and destroyed my whole internet-connection, computer, flat, city, country, continent,... ;-) )

RealRancor
ownCloud master
Posts: 17381
Joined: Sat May 26, 2012 3:00 pm
ownCloud version: 9.0.2
Webserver: nginx
Database: MySQL
OS: Linux
PHP version: 7.0.x

Re: Deleting old "File Versions"

Postby RealRancor » Fri Jan 04, 2013 4:28 pm

Hi,

i think deleting the file via FTP is not a good idea because the entries in your database are not deleted with this method. Maybe rescanning the filesystem as described here will update / remove the unused entries:

viewtopic.php?f=17&t=7236
*gone*

Zakoon
Starter
Posts: 97
Joined: Tue Jan 31, 2012 5:06 pm

Re: Deleting old "File Versions"

Postby Zakoon » Fri Jan 04, 2013 4:32 pm

Ups, too late :D Everything is still working, but having things in the DB that don't belong there could cause problems...

I rescanned the filesystem as recommanded, but didn't get any feedback, so I don't know if it solved the problem.

I probably will set up the owncloud instance completely new, when 5.0 is out...

RealRancor
ownCloud master
Posts: 17381
Joined: Sat May 26, 2012 3:00 pm
ownCloud version: 9.0.2
Webserver: nginx
Database: MySQL
OS: Linux
PHP version: 7.0.x

Re: Deleting old "File Versions"

Postby RealRancor » Fri Jan 04, 2013 7:46 pm

Hey,

if you use MySQL just use a tool like phpmyadmin or the command line tool and have a look at the oc_fscache table and delete all entries which are pointing to the (not existing) file_versions files.
*gone*

seiferflo
Newbie
Posts: 3
Joined: Mon Jan 12, 2015 10:46 pm
ownCloud version: 7.0.3
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.5

Re: Deleting old "File Versions"

Postby seiferflo » Tue Jan 13, 2015 12:47 pm

Hi,
I'd like to reup that old post because as a new user of OwnCloud I would like to know what is the safest/cleanest way of deleting old file versions?

I don't want most of my folders to keep old versions because it takes an insane amount of space for the quantity of data we share here. As there is no option in owncloud to define the number of versions we want for each folder, is there a way to delete old file versions for specific folders?

I read the link of RealRancor and saw a script to rescan the filesystem but this looks to be a work around.
Thank you in advance for your feedback
Best Wishes

freibadschwimmer
Newbie
Posts: 2
Joined: Thu Nov 13, 2014 10:07 am
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.6.2

Re: Deleting old "File Versions"

Postby freibadschwimmer » Wed Jun 24, 2015 2:24 pm

I also stumbled over this thread when having the same issue.

I finally deleted all files (via SSH) in the files_versions folder and then rescanned the file system (following RealRancor's link).
I checked the db (oc_filecache) and there are no entries from the files_versions; also, I do not experience any problems after I followed this procedure, so it appears to work.

@ seiferflo
If you can wait, I think this issue will be addressed in OC 8.1 or 8.2, see: https://github.com/owncloud/core/issues/13232


  • Similar Topics
    Replies
    Views
    Last post

Return to “ownCloud Community Edition 5.x and older”

Who is online

Users browsing this forum: No registered users and 0 guests