Tutorial: How to migrate mass data to a new NextCloud server


#21

@fab

Fab, I read through your tutorial and i was relieved to see it was possible to migrate mass data onto my NextClould quickly. Thank You.

I followed your tutorial and i can see that the (test) file i attempted to move was in fact relocated to the destination.
But, when i ran
sudo -u www-data php console.php files:scan --all
command in " /var/www/nextcloud " an error was returned which says:

Your data directory is invalid

Ensure there is a file called ".ocdata" in the root of the data directory.

Your data directory is readable by other users

Please change the permissions to 0770 so that the directory cannot be listed by other users.

An unhandled exception has been thrown:

Exception: Environment not properly prepared. in /var/www/nextcloud/lib/private/Console/Application.php:148

Stack trace:

#0 /var/www/nextcloud/console.php(89): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

Also, i can’t even access any of my user accounts . i’m getting an error that says: "
" Your data directory is invalid
Ensure there is a file called “.ocdata” in the root of the data directory. "


#22

In my case, I didn’t realize that the files needed to be inside of the users “./files” folder /data/username/files and I was placing them in the /data/username folder. The scan indexed the files, but they didn’t show up in the web interface. Moving them to the correct sub-directory and rescanning fixed it.


#23

Hi. How can I migrate when Nexcloud using S3 has external storage. Because… the directory structura doesent exist.

For example… I have directory structure with files (/tmp/user1 for example. 1GB of data distributed into 100 files) and I need upload the directory structure and its files into an spesific user account. But… I not known the password of the user. Im know the admin user and password.

How can I do?

My regards.


#24

Thanks for sharing this information with us, printer offline fix helped me to get the solution of this. I never knew bout the console.php script to force a scan and update the database so I always spent a few days using the sync app for each user.


#25

Would be nice to do something like this from one NextCloud iocage to another NextCloud iocage. This is cause my instance was done from third-party install and some features don’t work.

My db and files folders are located outside of the iocage/jail. Theoretically, if it’s safe to map the files folder without the data being lost, that should be as simple as editing the files location, but I’ve yet to get any replies on the subject… aside from “don’t knows”. There are no comments or contacts, etc. There are some notes that would be easily copied over.

Thanks in advance!


#26

My db and files folders are located outside of the iocage/jail. Theoretically, if it’s safe to map the files folder without the data being lost, that should be as simple as editing the files location, but I’ve yet to get any replies on the subject get all the help from the Epson Printer Error code 0xf1


#27

Hi,

I am new to the community and a question regarding this post.
I have a one node google’s Ganeti cluster with multiple VM’s, nextcloud and the backup VM’s are the only VM’s with external data storage. The Ganeti master /host) and all VM’s run Ubutuntu 16.04.

  • For nextcloud I have a raid 5 attached over nfs from the host (Ganeti) to the guest (nextcloud)
  • I am using samba 4 AD to manage user’s accounts
  • the user’s folder in the data directory is the UUID of the users

Now I want to move from Ubuntu to debian for the Ganeti master (host) as well as for the VM’s (guests). That means I have to delete every thing, keep the existing raid and reinstall host and guests.
So when setting up a new samba 4 AD and create the users again, they will have a different UUID.
Is there any way to migrate the data of the existing accounts to the new accounts with the new UUID?

Thanks in advanced