description how to administer different databases

Issue #255 wontfix
Former user created an issue

Originally reported on Google Code with ID 255

Please add this to the README:

To administer your database, you should create a subfolder ./data/ and link your database
into that folder, for example:

ln -s /var/www/owncloud/data/owncloud.db ./data/owncloud.db

this way you can administer several databases in one instance

Reported by rubens.androidhandy on 2014-06-17 13:18:46

Comments (2)

  1. Christopher Kramer
    Hmm. I am not really sure. You assume:
    - a linux server
    - a user with ssh access
    - that the db is already somewhere else on the server and not a copy but the actual
    db should be modified
    
    The user could also be using Windows Server, have only FTP access and so on. Why should
    we explain linux symlinks? We could also explain how to create hard- or softlinks in
    NTFS, which is possible as well. But I guess our Readme is not the place to teach people
    how they use their operating system.
    
    And on top of that, using symlinks is a bit dangerous with SQLite as it creates it's
    journal in the folder of the DB you opened. From the SQlite manual:
    
    "If there are multiple (hard or symbolic) links to a database file, the journal will
    be created using the name of the link through which the file was opened. If a crash
    occurs and the database is opened again using a different link, the hot journal will
    not be located and no rollback will occur." [1]
    
    This is usually not an issue, but you should be aware of things like this. And writing
    it in the Readme without saying anything about this is also not a good idea in my opinion.
    
    By the way, this has nothing to do with managing multiple dbs in one instance. You
    can manage multiple dbs with phpliteadmin without symlinks. Just drop them in the same
    folder as phpliteadmin. Or write their location in the configuration ($databases) if
    they should stay in different folders. No symlinks required.
    
    [1] http://sqlite.org/atomiccommit.html
    

    Reported by crazy4chrissi on 2014-06-17 13:58:13 - Labels added: Component-Docs

  2. Log in to comment