Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
moving_nextcloud_data [2022/03/01 19:05]
warmachine
moving_nextcloud_data [2022/03/01 19:09] (current)
warmachine
Line 18: Line 18:
  
 <code>nano /path/to/nextcloud/config/config.php <code>nano /path/to/nextcloud/config/config.php
-       'datadirectory' => '/new/path/to/data',</code>+'datadirectory' => '/new/path/to/data',</code>
                
 change the location in the database: change the location in the database:
Line 25: Line 25:
  
 <code>dbuser=$(awk -F\' "/'dbuser'/{print \$4;exit}" /path/to/nextcloud/config/config.php) <code>dbuser=$(awk -F\' "/'dbuser'/{print \$4;exit}" /path/to/nextcloud/config/config.php)
-      dbpassword=$(awk -F\' "/'dbpassword'/{print \$4;exit}" /var/www/nextcloud/config/config.php) +dbpassword=$(awk -F\' "/'dbpassword'/{print \$4;exit}" /var/www/nextcloud/config/config.php) 
-      mysql -u$dbuser -p$dbpassword</code>+mysql -u$dbuser -p$dbpassword</code>
              
 Inside the MySQL console: Inside the MySQL console:
  
-      <code>use <nextclouddb>; +<code> 
-      update oc_storages set id='local::/new/path/to/data/' where id='local::/path/to/data/'; //take care about backslash at the end of path!! +use <nextclouddb>; 
-      quit;</code>+update oc_storages set id='local::/new/path/to/data/' where id='local::/path/to/data/';  
 +quit; 
 +</code>
              
 Again outside the MySQL console Again outside the MySQL console
  
-      <code>unset dbuser dbpassword</code>+<code>unset dbuser dbpassword</code>
    
 turn maintenance mode off: turn maintenance mode off:
Last modified: le 2022/03/01 19:05