Linux anchor 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
Apache/2.4.18 (Ubuntu)
Server IP : 10.10.100.4 & Your IP : 216.73.217.150
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
owncloud-prm /
core /
doc /
admin /
maintenance /
Delete
Unzip
Name
Size
Permission
Date
Action
backup.html
13.81
KB
-rw-r--r--
2018-04-19 18:17
enable_maintenance.html
8.13
KB
-rw-r--r--
2018-04-19 18:17
index.html
12.35
KB
-rw-r--r--
2018-04-19 18:17
manual_upgrade.html
31.04
KB
-rw-r--r--
2018-04-19 18:17
manually-moving-data-folders.html
15.27
KB
-rw-r--r--
2018-04-19 18:17
migrating.html
21.35
KB
-rw-r--r--
2018-04-19 18:17
package_upgrade.html
15.22
KB
-rw-r--r--
2018-04-19 18:17
restore.html
11.71
KB
-rw-r--r--
2018-04-19 18:17
update.html
24.17
KB
-rw-r--r--
2018-04-19 18:17
upgrade.html
28.18
KB
-rw-r--r--
2018-04-19 18:17
Save
Rename
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>How To Manually Move a Data Directory — ownCloud 10.0.7 Server Administration Manual 10.0.7 documentation</title> <link rel="stylesheet" href="../_static/" type="text/css" /> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> <link rel="stylesheet" href="../_static/main.min.css" type="text/css" /> <link rel="stylesheet" href="../_static/styles.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', VERSION: '10.0.7', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true, SOURCELINK_SUFFIX: '.txt' }; </script> <script type="text/javascript" src="../_static/jquery.js"></script> <script type="text/javascript" src="../_static/underscore.js"></script> <script type="text/javascript" src="../_static/doctools.js"></script> <script type="text/javascript" src="../_static/js/jquery-1.11.0.min.js"></script> <script type="text/javascript" src="../_static/js/jquery-fix.js"></script> <script type="text/javascript" src="../_static/bootstrap-3.1.0/js/bootstrap.min.js"></script> <script type="text/javascript" src="../_static/bootstrap-sphinx.js"></script> <link rel="index" title="Index" href="../genindex.html" /> <link rel="search" title="Search" href="../search.html" /> <link rel="next" title="Issues and Troubleshooting" href="../issues/index.html" /> <link rel="prev" title="Migrating to a Different Server" href="migrating.html" /> <meta charset='utf-8'> <meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'> <meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="theme-color" content="#1d2d44"> </head> <body> <div class="wrap container not-front"> <div class="content row"> <main class="main"> <div class="row page-content-header"> <div class="col-md-5 col-md-offset-7"> <form class="headersearch" style="margin-bottom:-3px;" action="../search.html" method="get"> <input type="text" value="" name="q" id="q" class="form-control" /> <button class="btn btn-default" type="submit" id="searchsubmit">Search</button> </form> </div> </div> <div class="row"> <div class="col-md-3"> <div class="sidebar"> <div class="menu-support-container"> <ul id="menu-support" class="menu"> <ul> <li><a href="../contents.html">Table of Contents</a></li> </ul> <ul class="current"> <li class="toctree-l1"><a class="reference internal" href="../index.html">Introduction</a></li> <li class="toctree-l1"><a class="reference internal" href="../release_notes.html">Release Notes</a></li> <li class="toctree-l1"><a class="reference internal" href="../whats_new_admin.html">What’s New in ownCloud 10.0.7</a></li> <li class="toctree-l1"><a class="reference internal" href="../installation/index.html">Installation</a></li> <li class="toctree-l1"><a class="reference internal" href="../upgrading/index.html">Upgrading</a></li> <li class="toctree-l1"><a class="reference internal" href="../configuration/index.html">Configuration</a></li> <li class="toctree-l1 current"><a class="reference internal" href="index.html">Maintenance</a><ul class="current"> <li class="toctree-l2"><a class="reference internal" href="enable_maintenance.html">Maintenance Mode Configuration</a></li> <li class="toctree-l2"><a class="reference internal" href="backup.html">Backing up ownCloud</a></li> <li class="toctree-l2"><a class="reference internal" href="upgrade.html">How to Upgrade Your ownCloud Server</a></li> <li class="toctree-l2"><a class="reference internal" href="package_upgrade.html">Upgrade ownCloud From Packages</a></li> <li class="toctree-l2"><a class="reference internal" href="update.html">Upgrading ownCloud with the Updater App</a></li> <li class="toctree-l2"><a class="reference internal" href="manual_upgrade.html">Manual ownCloud Upgrade</a></li> <li class="toctree-l2"><a class="reference internal" href="restore.html">Restoring ownCloud</a></li> <li class="toctree-l2"><a class="reference internal" href="migrating.html">Migrating to a Different Server</a></li> <li class="toctree-l2 current"><a class="current reference internal" href="#">How To Manually Move a Data Directory</a><ul> <li class="toctree-l3"><a class="reference internal" href="#fix-hardcoded-database-path-variables">Fix Hardcoded Database Path Variables</a></li> <li class="toctree-l3"><a class="reference internal" href="#fix-application-settings">Fix Application Settings</a></li> </ul> </li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="../issues/index.html">Issues and Troubleshooting</a></li> <li class="toctree-l1"><a class="reference internal" href="../enterprise/index.html">Enterprise Features</a></li> <li class="toctree-l1"><a class="reference internal" href="../appliance/index.html">The ownCloud X Appliance</a></li> <li class="toctree-l1"><a class="reference internal" href="../faq/index.html">FAQ</a></li> </ul> </ul> </div> </div> </div> <div class="col-md-9"> <div class="page-content"> <ul class="prevnext-title list-unstyled list-inline"> <li class="prev"> <a href="migrating.html" title="Previous Chapter: Migrating to a Different Server"><span class="glyphicon glyphicon-chevron-left visible-sm"></span><span class="hidden-sm">« Migrating to ...</span> </a> </li> <li class="next"> <a href="../issues/index.html" title="Next Chapter: Issues and Troubleshooting"><span class="glyphicon glyphicon-chevron-right visible-sm"></span><span class="hidden-sm">Issues and Tr... »</span> </a> </li> </ul> <div class="section" id="how-to-manually-move-a-data-directory"> <span id="datadir-move-label"></span><h1>How To Manually Move a Data Directory<a class="headerlink" href="#how-to-manually-move-a-data-directory" title="Permalink to this headline">¶</a></h1> <p>If you need to move your ownCloud data directory from its current location to somewhere else, here is a manual process that you can take to make it happen.</p> <div class="admonition note"> <p class="first admonition-title">Note</p> <p>This example assumes that:</p> <ul class="last simple"> <li>The current folder is: <cite>/var/www/owncloud/data</cite></li> <li>The new folder is: <cite>/mnt/owncloud</cite></li> <li>You’re using Apache as your webserver</li> </ul> </div> <ol class="arabic simple"> <li>Stop Apache</li> <li>Use rsync to sync the files from the current folder to the new one</li> <li>Create a symbolic link from the new directory to the old one</li> <li>Double-check <a class="reference external" href="https://doc.owncloud.org/server/latest/admin_manual/installation/installation_wizard.html#strong-perms-label">the directory permissions</a> on the new directory</li> <li>Restart Apache</li> </ol> <p>To save time, here’s the commands which you can copy and use:</p> <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">apachectl</span> <span class="o">-</span><span class="n">k</span> <span class="n">stop</span> <span class="n">rsync</span> <span class="o">-</span><span class="n">avz</span> <span class="o">/</span><span class="n">var</span><span class="o">/</span><span class="n">www</span><span class="o">/</span><span class="n">owncloud</span><span class="o">/</span><span class="n">data</span> <span class="o">/</span><span class="n">mnt</span><span class="o">/</span><span class="n">owncloud</span> <span class="n">ln</span> <span class="o">-</span><span class="n">s</span> <span class="o">/</span><span class="n">mnt</span><span class="o">/</span><span class="n">owncloud</span> <span class="o">/</span><span class="n">var</span><span class="o">/</span><span class="n">www</span><span class="o">/</span><span class="n">owncloud</span><span class="o">/</span><span class="n">data</span> <span class="n">apachectl</span> <span class="o">-</span><span class="n">k</span> <span class="n">graceful</span> </pre></div> </div> <div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">If you’re on CentOS/Fedora, try <code class="docutils literal"><span class="pre">systemctl</span> <span class="pre">restart</span> <span class="pre">httpd</span></code>. If you’re on Debian/Ubuntu try <code class="docutils literal"><span class="pre">sudo</span> <span class="pre">systemctl</span> <span class="pre">restart</span> <span class="pre">apache2</span></code> To learn more about the systemctl command, please refer to <a class="reference external" href="https://www.digitalocean.com/community/tutorials/systemd-essentials-working-with-services-units-and-the-journal">the systemd essentials guide</a></p> </div> <div class="section" id="fix-hardcoded-database-path-variables"> <h2>Fix Hardcoded Database Path Variables<a class="headerlink" href="#fix-hardcoded-database-path-variables" title="Permalink to this headline">¶</a></h2> <div class="section" id="update-the-oc-storages-table"> <h3>Update the oc_storages table<a class="headerlink" href="#update-the-oc-storages-table" title="Permalink to this headline">¶</a></h3> <p>If you want to manually change the location of the data folder in the database, run the SQL below:</p> <div class="highlight-sql"><div class="highlight"><pre><span></span><span class="k">UPDATE</span> <span class="n">oc_storages</span> <span class="k">SET</span> <span class="n">id</span><span class="o">=</span><span class="s1">'local::/mnt/owncloud'</span> <span class="k">WHERE</span> <span class="n">id</span><span class="o">=</span><span class="s1">'local::/var/www/owncloud/data/'</span><span class="p">;</span> </pre></div> </div> </div> <div class="section" id="update-the-oc-accounts-table"> <h3>Update the oc_accounts table<a class="headerlink" href="#update-the-oc-accounts-table" title="Permalink to this headline">¶</a></h3> <p>You next need to update the <code class="docutils literal"><span class="pre">home</span></code> column in the <code class="docutils literal"><span class="pre">oc_accounts</span></code> table. This column contains the absolute path for user folders, e.g., <code class="docutils literal"><span class="pre">/mnt/data/files/admin</span></code>. Assuming that the new home directory is: <code class="docutils literal"><span class="pre">/mnt/data/files/super-admin</span></code>, and that the user’s id is 1, you could change it using the following SQL statement:</p> <div class="highlight-sql"><div class="highlight"><pre><span></span><span class="k">UPDATE</span> <span class="n">oc_accounts</span> <span class="k">SET</span> <span class="n">home</span><span class="o">=</span><span class="s1">'/mnt/data/files/super-admin'</span> <span class="k">WHERE</span> <span class="n">id</span><span class="o">=</span><span class="mi">1</span><span class="p">;</span> </pre></div> </div> <div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">Please don’t copy and paste this example verbatim — nor any of the others. It, and the others, are provided only as guides to what you should or could do.</p> </div> </div> <div class="section" id="update-the-oc-jobs-table"> <h3>Update the oc_jobs table<a class="headerlink" href="#update-the-oc-jobs-table" title="Permalink to this headline">¶</a></h3> <p>The next area to check is the <cite>oc_jobs</cite> table. The logrotate process may have hard-coded a non-standard (or old) value for the data path. To check it, run the SQL below and see if any results are returned:</p> <div class="highlight-sql"><div class="highlight"><pre><span></span><span class="k">SELECT</span> <span class="o">*</span> <span class="k">FROM</span> <span class="n">oc_jobs</span> <span class="k">WHERE</span> <span class="k">class</span> <span class="o">=</span> <span class="s1">'OC\Log\Rotate'</span><span class="p">;</span> </pre></div> </div> <p>If any are, run the SQL below to update them, changing the value as appropriate.</p> <div class="highlight-sql"><div class="highlight"><pre><span></span><span class="k">UPDATE</span> <span class="n">oc_jobs</span> <span class="k">SET</span> <span class="n">argument</span> <span class="o">=</span> <span class="s1">'/your/new/data/path'</span> <span class="k">WHERE</span> <span class="n">id</span> <span class="o">=</span> <span class="o"><</span><span class="n">id</span> <span class="k">of</span> <span class="n">the</span> <span class="n">incorrect</span> <span class="n">record</span><span class="o">></span><span class="p">;</span> </pre></div> </div> </div> </div> <div class="section" id="fix-application-settings"> <h2>Fix Application Settings<a class="headerlink" href="#fix-application-settings" title="Permalink to this headline">¶</a></h2> <p>One thing worth noting is that individual apps may reference the data directory separate from the core system configuration. If so, then you will need to find which applications do this, and change them as needed.</p> <p>For example, if you listed the application configuration by running <cite>occ config:list</cite>, then you might see output similar to that below:</p> <div class="highlight-json"><div class="highlight"><pre><span></span><span class="p">{</span> <span class="nt">"apps"</span><span class="p">:</span> <span class="p">{</span> <span class="nt">"fictitious"</span><span class="p">:</span> <span class="p">{</span> <span class="nt">"enabled"</span><span class="p">:</span> <span class="s2">"yes"</span><span class="p">,</span> <span class="nt">"installed_version"</span><span class="p">:</span> <span class="s2">"2.3.2"</span><span class="p">,</span> <span class="nt">"types"</span><span class="p">:</span> <span class="s2">"filesystem"</span><span class="p">,</span> <span class="nt">"datadir"</span><span class="p">:</span> <span class="s2">"var/www/owncloud/data"</span> <span class="p">}</span> <span class="p">}</span> <span class="p">}</span> </pre></div> </div> <p>Here, the “fictitious” application references the data directory as being set to <cite>var/www/owncloud/data</cite>. So you would have to change the value by using the <cite>config:app:set</cite> option. Here’s an example of how you would update the setting:</p> <div class="highlight-console"><div class="highlight"><pre><span></span><span class="go">occ config:app:set --value /mnt/owncloud fictitious datadir</span> </pre></div> </div> </div> </div> <ul class="prevnext-title list-unstyled list-inline"> <li class="prev"> <a href="migrating.html" title="Previous Chapter: Migrating to a Different Server"><span class="glyphicon glyphicon-chevron-left visible-sm"></span><span class="hidden-sm">« Migrating to ...</span> </a> </li> <li class="next"> <a href="../issues/index.html" title="Next Chapter: Issues and Troubleshooting"><span class="glyphicon glyphicon-chevron-right visible-sm"></span><span class="hidden-sm">Issues and Tr... »</span> </a> </li> </ul> </div> </div> </div> </main> </div> </div> </body> </html>