Restoring Single Files/Folders

Is there a way to restore not the entire backup but only a single file/folder?

The background is the following:

A backup job is done regularly.
With over hundreds of users it is unpractical to restore the data of all users if only one file of a user is needed to restore. Especially since that means that the other users will lose the data that has changed since the last backup.

Right now the only solution that i have is to copy the data manually and execute the occ files:scan command.

Since the shares of the restores file are stored in the database, this information is lost.

Is there another way to restore single files, perhaps with the information that was stored in the database? I also have the backup of the database that i can search for this file and the share of it?

Yes. I think that is the solution. But you can write a script for it.

You can copy a single file, folder or all files from one user from the backup (only file-backup) back in the nextcloud structure an then re-scan the files for the user. But shares and other parameter for the files get lost.

sudo -u www-data php occ files:scan username

Using the occ command — Nextcloud latest Administration Manual latest documentation

Hint:
Every user has got an own trashbin. You need only the backup and administrator if the user delete the trash. :wink: Make a nextcloud training for your users. You can educate them. For every restore they must spend you a coffee :wink:

Very good idea :crazy_face: :coffee:

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.