Owncloud https://tech.feedyourhead.at/ en Owncloud: doing admin-tasks with console.php https://tech.feedyourhead.at/content/owncloud-doing-admin-tasks-consolephp <span class="field field--name-title field--type-string field--label-hidden">Owncloud: doing admin-tasks with console.php</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Today, I had some problems with owncloud. During upgrading it removed my symbolic link and created a new data-directory. This wasn't really a big problem, but after I linked to the right data-directory owncloud didn't list the old files in my directory. After a while I found this very nice little tool console.php. It's a part of owncloud and it is for doing admin-tasks on the command-line. So I just rescaned my data-directory:</p> <pre> <code> dr@tardis:# su www-data www-data@tardis:/var/www/owncloud$ php console.php files:scan --all Scanning file /maytech/ Scanning folder /maytech/ Scanning file /maytech/files Scanning file /maytech/cache Scanning folder /maytech/files Scanning file /maytech/files/photos Scanning file /maytech/files/documents Scanning file /maytech/files/ownCloudUserManual.pdf Scanning file /maytech/files/music Scanning folder /maytech/files/photos Scanning file /maytech/files/photos/san francisco.jpg Scanning file /maytech/files/photos/paris.jpg Scanning file /maytech/files/photos/squirrel.jpg Scanning folder /maytech/files/documents Scanning file /maytech/files/documents/example.odt Scanning folder /maytech/files/music Scanning file /maytech/files/music/projekteva-letitrain.mp3 </code></pre> <p>Here is an output of the help-screen with all the arguments of console.php:</p> <p><img alt="" src="http://tech.feedyourhead.at/sites/tech.feedyourhead.at/files/pictures/owncloud-console.png" /></p> </div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/hoti" typeof="schema:Person" property="schema:name" datatype="">Hoti</span></span> <span class="field field--name-created field--type-created field--label-hidden">Feb 16 2015</span> <div class="field field--name-field-tagies field--type-entity-reference field--label-above"> <div class="field__label">Tags</div> <div class='field__items'> <div class="field__item"><i class="fa fa-tags"></i> <a href="/tags/owncloud" hreflang="en">Owncloud</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/tags/sysadmin" hreflang="en">Sysadmin</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/Linux" hreflang="en">Linux</a></div> </div> </div> <section class="field field--name-comment-node-blog field--type-comment field--label-hidden comment-wrapper"> </section> <section class="field field--name-comment field--type-comment field--label-above comment-wrapper"> <h2 class='title comment-form__title'> <i class="fa fa-comments-o"></i> Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=52&amp;2=comment&amp;3=comment" token="49zSLqY2x0-bV427kHdEJh-d3ij60KGuy1maWhcjdoU"></drupal-render-placeholder> </section> Mon, 16 Feb 2015 12:49:52 +0000 Hoti 52 at https://tech.feedyourhead.at Owncloud7: Convert Database from SQLite to Mysql https://tech.feedyourhead.at/content/owncloud7-convert-database-sqlite-mysql <span class="field field--name-title field--type-string field--label-hidden">Owncloud7: Convert Database from SQLite to Mysql</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p><a href="http://www.owncloud.org"><img alt="" src="http://tech.feedyourhead.at/sites/tech.feedyourhead.at/files/pictures/owncloud_logo.png" style="width: 629px; height: 312px;" /></a></p> <p>Owncloud's SQLite-Database is just for small use cases. On larger environments it's better to use a mysql-database. Owncloud7 has a very nice little tool to convert the existing SQLite-database to mysql and change the owncloud-configuration.</p> <p>First we have to create a mysql-database:</p> <pre> <code> Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> create database owncloud; Query OK, 1 row affected (0.00 sec) mysql> GRANT ALL PRIVILEGES ON owncloud.* TO 'ownclouduser'@'localhost' IDENTIFIED BY 'Supersecurepassword'; </code></pre> <p>Then change into owncloud-directory and set the execute-permissions on the occ-script:</p> <pre> <code> chmod 700 occ </code></pre> <p>Now convert the database:</p> <pre> <code> ./occ db:convert-type --password="Supersecurepassword" --all-apps mysql ownclouduser localhost owncloud </code></pre> </div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/hoti" typeof="schema:Person" property="schema:name" datatype="">Hoti</span></span> <span class="field field--name-created field--type-created field--label-hidden">Nov 27 2014</span> <div class="field field--name-field-tagies field--type-entity-reference field--label-above"> <div class="field__label">Tags</div> <div class='field__items'> <div class="field__item"><i class="fa fa-tags"></i> <a href="/tags/sysadmin" hreflang="en">Sysadmin</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/Linux" hreflang="en">Linux</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/tags/owncloud" hreflang="en">Owncloud</a></div> </div> </div> <section class="field field--name-comment-node-blog field--type-comment field--label-hidden comment-wrapper"> </section> <section class="field field--name-comment field--type-comment field--label-above comment-wrapper"> <h2 class='title comment-form__title'> <i class="fa fa-comments-o"></i> Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=21&amp;2=comment&amp;3=comment" token="5XSG_rpahIxFRK6x2zFQ269KDIgAOiq-4yaA65G5Kkc"></drupal-render-placeholder> </section> Thu, 27 Nov 2014 10:51:05 +0000 Hoti 21 at https://tech.feedyourhead.at