Encrypted Group Folder could not be restored

Hello. I am testing backup, restoration, and server migration procedures for our future operations.

Regarding the target server, I am using the latest NC31 with server-side encryption enabled for the entire system. Additionally, I enabled group folders encryption.

The backup and restoration to a different domain are being processed according to this manual.

After the restoring process, the functionality itself is working without any issues. While data in regular folders is being restored correctly, only the group folders are experiencing decryption problems, and we were unable to restore the data.

If anyone has information about how to backup and restore encrypted group folders, your guidance would be greatly appreciated.

Thank you,

Can you elaborate? What behavior are you seeing specifically? And what about logs?

@jtr
Hi, thanks.
I will try to explan what I did.

Purpose : Backup and Restore, and Migration to different domain test.

Base Server : NC31 fresh installation by web-installer, Server-side-Encryption enabled. Additionally, Group folders encryption is also enabled.
Data directory is separated.

Target Server : On a same server, but different domain. Same environment.

Server Migration work:

  1. Maintanance mode enabled
    occ maintenance:mode --on
  2. Copy Nextcloud
    rsync -Aatvx (from base server)/ (to Target Server)
  3. Copy Data Directory
    rsync -Aatvx (from base server)/ (to Target Server)
  4. Backup Database
    First, I used “mysqldump”, but it did not work well, so I export all table by PhpMyAdmin.
  5. Restore Database
    Restore database by phpMyAdmin. Import all the tables to new Database.
  6. Modify config.php
    Change base URL to new domain.
    Change database setting
  7. Disabled Maintainance mode
    occ maintenance:mode --off

Result:

  1. Nextcloud works well
  2. Files in a personal folder, all fine. (Encrypted, and readable)
  3. Files in a group folder, Fails to decrypt. For example, “readme.md” file will be like this.
    HBEGIN:oc_encryption_module:OC_DEFAULT_MODULE:cipher:AES-256-CTR:signed:true:useLegacyFileKey:false:encoding:binary:HEND-----------------------------------------------------------------------------------------------------------------------------------
  4. Log Files
    Nothing about migration. It only shows normal things.
    No error of decryption fails.

I really don’t know why the files in group folder fails to decrypt.

So, now I am thinking to decrypt before migration, and I tested it. (occ encryption:decrypt-all)
It seems work well, but I found that some files fails decryption, and get “***.decrypted” files. I will ask this in the other thread…

Hopefully, I can backup and restore as all files are encrypted.
Thanks,