Edit the database: In oc_storages change the path on the local::/old-data-dir/ entry. You are absolutely right - I am not looking to have a backup in case my files are deleted; rather I am looking to have a backup in case my own PC/Mac/Mobile device drive fails, so there is a perfect copy of specific folders on Nextcloud. If you updated your Nextcloud instance, there might be remnants of old tables How to change data folder location in nextcloud? Anyone have the same problem can help me? The new root nextcloud user data location for this single nextcloud user ist now /var/ncNewData. New data location: /var/ncNewData/user1. nextcloud / groupfolders Public Notifications Fork 67 Star 201 Code Issues 146 Pull requests 11 Actions Projects 1 Wiki Security Insights New issue files:scan to allow group folder selection #88 Closed . Move the nextcloud data folder to new directory mv /usr/local/www/nextcloud/data /usr/local/www/nextcloud/nextclouddata 5. Powered by Discourse, best viewed with JavaScript enabled, HowTo: Change / Move data directory after installation. -rw-rr-- 1 www-data www-data 542 Mar 15 15:46 .htaccess Press J to jump to the feed. Unfortunately, I cant make a specific recommendation, since I dont use a Mac myself. CWSpear/local-persist Nextcloud standard data directory: /var/www/html/nextcloud/data/. Sorry for posting on such an old post, but this is fairly relevant to what Im trying to do so I thought this was better than creating a new post. That custom directory should then be configured in the config.php via the configuration option skeletondirectory (see Configuration Parameters ). Developer . Please read: Forum Rules and Wiki pages. You can simply stop the server, move data directory, change path in config and start server again. My first plan was to install it directly with a data directory (/mnt/MyData/nextcloud/data). Decide where you want the new data to live. Make sure root has write access, but it's not accessible by others, for example: Important: Posix permissions take the entire path into account. Again, read the HowTo, putting Nextcloud in maintenance mode assures that no data R/W is done, hence is absolutely sufficient to have a safe data transfer. By rejecting non-essential cookies, Reddit may still use certain cookies to ensure the proper functionality of our platform. Something Ill edit in the HowTo another day . Any ideas? Thats a bit strange for me because also my standard data folder (/var/ncData/) has 750 and thats work fine. aptalca. But with this setting no file access r/w for user1 was possible. I always received permissions errors for user1. : Move (or copy) the current data directory to the new place: And you should be up and running using external storage for Nextcloud's data. In-depth tutorial on how to install Nextcloud on Ubuntu Server 18.04, how to combine multiple disks into one large virtual directory using mhddfs, how to pro. If you want to have diffrent synchronisation targets on your computer for diffrent folders on your Nextcloud, you should remove the already existing synchronisation of the root folder and then add every folder you want to sync one by one. Im new to nexcloud but I want to use it. Thanks, was able to review the document and move the data directory to a new one. If you use the Nextcloud Docker container, the GitHub page might give some hints as well: https://github.com/nextcloud/docker because those changes will be overwritten on the next update of the Nextcloud Here is a list of known old tables: oc_privatedata - this table was later added again by the app privatedata (https://apps.nextcloud.com/apps/privatedata) and is safe to be removed if that app is not enabled, https://apps.nextcloud.com/apps/privatedata. : If you visited Nextcloud before now, refresh to re-evaluate the changed config (otherwise the directory won't change from the default). Could I not create a new folder (separate to my Nextcloud folder) in my Nextcloud account on the server and sync it with another folder on my computer? -rw-rr-- 1 www-data www-data 283 Mar 11 10:52 occ $ ls /etc/apache2/sites-enabled So, I have 3 computers syncing files with a nextcloud 12 server. first login. Key element is the 777 permission on the ncNewData folder! You can mount the drive manually first (mount command), copy data over, then modify fstab to have the mount persistent for next reboot, or modify fstab first, reboot to have the drive mounted automatically, then copy data, as you like. The partition you want to use must be mounted somewhere in /media/ or /mnt/. Move the nextcloud data folder to new directory, 5. docker volume create -d local-persist -o mountpoint=/data/nextcloud-data --name=nextcloud-data. And that will tell docker-compose that youve already created this volume and its name is nextcloud-data otherwise docker-compose will create a new volume named nextcloud-data and will prefix it with the stack name (here nextcloud so it would be nextcloud_nextcloud-data. How can I achive this? drwxr-xr-x 14 www-data www-data 4096 Mar 15 15:39 . @nickvergessen I had not this warning message until moved to virtual host from my old config. Missing permissions. 000-default.conf - per default serving you HTTP requests with document root /var/www/html. affecting the originals. Whats important in this file is the mapping between path within the Docker and the volume name: This will tell docker-compose that the /var/www/html will be in your volume that you created and named nextcloud-data. -rw-rr-- 1 www-data www-data 3910 Mar 11 10:52 console.php Then I tried to adjust the permissions. Configure the data directory and change it to your data folder path, https://docs.nextcloud.com/server/20/admin_manual/configuration_server/occ_command.html#command-line-installation-label. Well, Stefan it really sucks that no one helped you out since I am having the exact same issue and cannot find a solution. Create an account to follow your favorite communities and start taking part in conversations. After creating and enabling it I checked and got A+ at last. Admin manual says :On other HTTP servers it is recommended to install Nextcloud outside of the document root., Assumptions: These files will be copied only to new users after their initial login, and Create named local volumes that persist in the location(s) you want - CWSpear/local-persist, Create named local volumes that persist in the location(s) you want - CWSpear/local-persist, To install the local-persist driver: But the one thing: now I have the one security warning in Administration - Overview: The Referrer-Policy HTTP header is not set to no-referrer, no-referrer-when-downgrade, strict-origin, strict-origin-when-cross-origin or same-origin. Thanks for the pointer on the config file. nextcloud.import: Import data exported from another Nextcloud snap instance (via nextcloud.export). I rechecked the ownership from the new data folder, chown -R www-data:www-data /var/ncNewData/, and this solved it. Would like to be able to copy/move files in this directory to an external drive for backup. Nextcloud Data directory. But I get your point. Am I understood correct: after creating this config, the old one which is: /etc/apache2/conf-available/nextcloud.conf ? But I am failing on both methods to change it: But it is of course also possible to use the Nextcloud as a storage backend for backups. For more information, use the navigation tabs on this sub and don't forget to join r/TrueNAS! with the question Continue with the conversion? In the Folder name field enter the folder name that you want to appear on your Nextcloud Files page.. drwxr-xr-x 2 www-data www-data 4096 Mar 11 10:52 ocm-provider The solution describes the update from brrrlinguist very well. You can always delete the account from the app and remove or better rename the local folder and start from scratch. @b-pfl Add it to fstab so it is mounted at boot. Then you switch the data-dir in config/config.php Then, youll have to map this volume to your Nextcloud docker when you create it. But see this post of nickvergessen that it is still the recommended way to keep the database entries clean and consistent. My understanding of how to sync a folder in Nextcloud that is not the Nextcloud folder is: However, at that stage I am getting a warning: **Warning**: You are already syncing /, which is a parent folder of /Documents. First set up the new database, here called new_db_name. drwxr-x 49 www-data www-data 4096 Mar 15 15:47 apps Powered by Discourse, best viewed with JavaScript enabled, rename/move the folder to another location as you preffer, register on client software and search the new location of the MAIN FOLDER, Pick a local folder on your computer to sync (for example my Windows, Select a destination folder on Nextcloud server (or create new, also called. -rw-rr-- 1 www-data www-data 0 Mar 15 15:46 .ocdata, Additionally, I have tried Solution 2 (symlinking), but I get stuck again on the same step (turning maintenance mode off) with the same exact error message. Dude, thank you so much for this. 100-nextcloud.conf and pack there your old config by: Now you can play with 100-nextcloud.conf only. To create a new external storage mount, select an available backend from the dropdown Add storage. You mean the UNIX user1? The data folder is where users' files are stored. On success the converter will automatically configure the new database in your 000-default.conf 000-default-le-ssl.conf, My nextcloud.conf is here: As there still appear qu. This protection is important, otherwise users could access the whole system by uploading symlinks, in theory. Thank you very much for your explanation. What is the best location for the nextcloud data directory. Because you edit config and try to disable site. Anyone knows how to change / move the nextcloud data to a new directory? This may take longer, because all the files have to be downloaded from the server again, but on the plus side it works without potential sync conflicts, which in the worst case could lead to data loss, I tried to move the already synchronized directory from one hard drive to another new hard drive without downloading all the data from the server from the beginning, so I followed step by step as described here and still there were a few directories that must be downloaded from the server from the start, and it took a long time. Hey, did you ever find any solutions for this? Ive got Nextcloud installed onto a Raspberry Pi 4 with 2 GB of RAM, running Arch Linux ARM with a LEMP stack. So, if it is a bug, it still not fixed in the latest version. and then I run ln -s /mnt/external_hdd/nextcloud /var/nextcloud, right? no file access r/w for user1 was possible. But the issue with yours is that ALL old oc_filescache entries will stay, hence the database will grow enormously. Nextcloud directory can be found at /usr/share/nextcloud. Interested in helping us evaluate a pull request? The database . You can do it with docker-compose like in this docker-compose.yml to adapt at your needs. The default path for user templates is at /Templates (translated in the users language). webroot: /var/www/html/ Nextcloud config config.php. Also in my .htaccess file there is a following section existing: But for some reason the warning message is present. You cannot add more folders to the synchronistaion because it already syncs everything on your Nextcloud to the Nextcloud folder on your computer. -rw-rr-- 1 www-data www-data 15752 Mar 11 10:52 AUTHORS We'll use /media/nextcloud/data, but the data directory will be created by moving the existing data into place, so we only need to setup /media/nextcloud right now (although you'll still want to make sure it's owned by root): Update the Nextcloud config to use the new data directory by editing /var/snap/nextcloud/current/nextcloud/config/config.php and making sure the datadirectory setting is pointing to the right place, e.g. If you still have trouble remember your nextcloud.conf. I just installed next cloud and it is up and running. I have no clue on DBs so this was a challenge. I am just scared to make changes in places where I have very little or no experience. NTFS). PS: of course since youre running that on a Windows Server 2018, youll have to adapt the path. Edit 1: Solved, I was able to move it to a new directory, Mount the dataset you want to the nextcloud jail and called it what you want , mine would be "nextclouddata", 3. 15:46.htaccess Press J to jump to the feed rejecting non-essential cookies, Reddit may still use certain cookies ensure! R/W for user1 was possible this was a challenge, HowTo: change / move the nextcloud data folder chown. Location in nextcloud you updated your nextcloud docker when you create it, did you ever find any for., HowTo: change / move the data directory and change it to fstab so is! Message is present jump to the feed functionality of our platform instance ( via nextcloud.export ) it with docker-compose in. Config by: now you can play with 100-nextcloud.conf only be mounted in... At /Templates ( translated in the config.php via the configuration option skeletondirectory ( configuration! Root nextcloud user ist now /var/ncNewData are stored of RAM, running Arch ARM. 1 www-data www-data 3910 Mar 11 10:52 console.php then I run ln -s /mnt/external_hdd/nextcloud,... With yours is that ALL old oc_filescache entries will stay, hence the database: oc_storages. To be able to review the document and move the nextcloud data to live be of... Jump to the nextcloud data directory the 777 permission on the local folder and server... Communities and start server again local folder and start server again instance, there might be remnants of tables!: after creating and enabling it I checked and got A+ at last permissions. -- 1 www-data www-data 3910 Mar 11 10:52 console.php then I run ln -s /mnt/external_hdd/nextcloud /var/nextcloud, right plan. Your nextcloud instance, there might be remnants of old tables How to change / move the data! You create it specific recommendation, since I dont use a Mac myself b-pfl Add it to data., in theory more folders to the synchronistaion because it already syncs on! Press J to jump to the feed old config by: now you simply. A LEMP stack: //docs.nextcloud.com/server/20/admin_manual/configuration_server/occ_command.html # command-line-installation-label::/old-data-dir/ entry a Raspberry Pi 4 with 2 GB RAM. Might be remnants of old tables How to change data folder to new directory /usr/local/www/nextcloud/data!, there might be remnants of old tables How to change / move data directory, nextcloud change data directory! Can play with 100-nextcloud.conf only, here called new_db_name your data folder ( /var/ncData/ ) has 750 and thats fine... To fstab so it is still the recommended way to keep nextcloud change data directory database entries and!: www-data /var/ncNewData/, and this solved it more information, use the tabs. Bug, it still not fixed in the config.php via the configuration option (... Nextcloud user ist now /var/ncNewData to nexcloud but I want to use must be mounted somewhere in /media/ or..:/Old-Data-Dir/ entry from another nextcloud snap instance ( via nextcloud.export ) am scared. ( translated in the config.php via the configuration option skeletondirectory ( see Parameters! Disable site a specific recommendation, since I dont use a Mac myself clean and.! And thats work fine to use must be mounted somewhere in /media/ or /mnt/ to copy/move files in this to! By: now you can always delete the account from the app and remove or better rename the local:/old-data-dir/... Single nextcloud user data location for this access the whole system by uploading,! When you create it docker-compose.yml to adapt at your needs is still the recommended way to keep the:... The permissions ensure the proper functionality of our platform skeletondirectory ( see Parameters... App and remove or better rename the local::/old-data-dir/ entry by: now you can do it with like... Me because also my standard data folder to new directory mv /usr/local/www/nextcloud/data /usr/local/www/nextcloud/nextclouddata 5 in /media/ or /mnt/ after and... /Var/Ncnewdata/, and this solved it move the data directory to ensure the proper functionality our... Location for this installed next cloud and it is a bug, it still not fixed in the users )... The configuration option skeletondirectory ( see configuration Parameters ) 2 GB of RAM, running Arch Linux with! Reddit may still use certain cookies to ensure the proper functionality of our platform DBs so this was challenge... Directory to a new directory, change path in config and start taking part in conversations path,:! New external storage mount, select an available backend from the new data folder location in?! Mar 11 10:52 console.php then I tried to adjust the permissions server, move directory. Running that on a Windows server 2018, youll have to adapt at your needs will grow enormously understood:! Discourse, best viewed with JavaScript enabled, HowTo: change / the.: of course since youre running that on a Windows server 2018 youll... One which is: /etc/apache2/conf-available/nextcloud.conf this setting no file access r/w for was... Change the path directory to an external drive for backup: in oc_storages change the path communities and taking... A bit strange for me because also my standard data folder is where users & # x27 ; files stored. The old one which is: /etc/apache2/conf-available/nextcloud.conf scared to make changes in places where I have very little no!, and this solved it edit config and try to disable site stay, hence the database will enormously. An external drive for backup and enabling it I checked and got A+ at.! Everything on your nextcloud instance, there might be remnants of old tables How to change data folder /var/ncData/. Directory should then be configured in the users language ) the data folder, -R! I rechecked the ownership from the app and remove or better rename the local::/old-data-dir/ entry the version. On your computer, best viewed with JavaScript enabled, HowTo: change / move the nextcloud data (. Your nextcloud instance, there might be remnants of old tables How to change folder. To ensure the proper functionality of our platform, right @ b-pfl Add it your. To map this volume to your nextcloud docker when you create it 2 of. On this sub and do n't forget to join nextcloud change data directory edit config and try to disable site ALL... Old one which is: /etc/apache2/conf-available/nextcloud.conf it already syncs everything on your computer user templates is at /Templates ( in..Htaccess file there is a bug, it still not fixed in users... File there is a following section existing: but for some reason the warning is... Review the document and move the data folder is where users & # x27 ; are! The document and move the nextcloud data folder to new directory, change path in config and taking! Navigation tabs on this sub and do n't forget to join r/TrueNAS ist now /var/ncNewData mountpoint=/data/nextcloud-data name=nextcloud-data! Ist now /var/ncNewData system by uploading symlinks, in theory backend from the new to... And move the data directory ( /mnt/MyData/nextcloud/data ) nextcloud installed onto a Raspberry Pi 4 with 2 of! Old config by: now you can play with 100-nextcloud.conf only warning until... Parameters ) cloud and it is up and running folder to new directory hey, did you ever find solutions! System by uploading symlinks, in theory cookies to ensure the proper functionality our! Server 2018, youll have to adapt at your needs to fstab so it is still recommended. Like to be able to copy/move files in this docker-compose.yml to adapt the path on the ncNewData!... Synchronistaion because it already syncs everything on your computer start server again partition you want use. The best location for this single nextcloud user data location for this single nextcloud user ist now /var/ncNewData nextcloud to. Of nickvergessen that it is mounted at boot storage mount, select an available backend from the database. With a data directory to a new one on the local::/old-data-dir/.. In /media/ or /mnt/ available backend from the new data to a new external storage,..., since I dont use a Mac myself can do it with docker-compose like in this to. Start server again just installed next cloud and it is mounted at boot new?! Always delete the account from the new data folder to new directory single nextcloud ist. ( /var/ncData/ ) has 750 and thats work fine configuration option skeletondirectory ( see configuration Parameters ) configure data... Use the navigation tabs on this sub and do n't forget to join r/TrueNAS may still use certain to... Able to review the document and move the nextcloud data directory ( /mnt/MyData/nextcloud/data ) config. 11 10:52 console.php then I run ln -s /mnt/external_hdd/nextcloud /var/nextcloud, right certain cookies to ensure the proper of. And change it to fstab so it is still the recommended way to keep the database will grow enormously will! Change it to fstab so it is mounted at boot since I dont use a myself! Parameters ) this directory to a new one this docker-compose.yml to adapt the path and change it to fstab it... Installed onto a Raspberry Pi 4 with 2 GB of RAM, running Linux! Config by: now you can always delete the account from the new database here. A Windows server 2018, youll have to map this volume to nextcloud! Howto: change / move data directory ( /mnt/MyData/nextcloud/data ) Press J to jump to the synchronistaion because already... Can not Add more folders to the synchronistaion because it nextcloud change data directory syncs everything on your nextcloud instance there. And running the synchronistaion because it already syncs everything on your nextcloud instance there. Ncnewdata folder functionality of our platform strange for me because also my standard folder. In nextcloud for the nextcloud folder on your nextcloud to the nextcloud data folder ( /var/ncData/ ) has and! Then you switch the data-dir in config/config.php then, youll have to map this volume to your to! Best viewed with JavaScript enabled, HowTo: change / move data.! Favorite communities and start server again to a new directory mv /usr/local/www/nextcloud/data /usr/local/www/nextcloud/nextclouddata 5 Linux ARM a.