FusqlFS

 view release on metacpan or  search on metacpan

README.pod  view on Meta::CPAN

=back

=head2 Boolean options

=over

=item B<--innodb>

Boolean, MySQL specific. If set, new tables created by the program use InnoDB
backend, MyISAM is used otherwise. Defaults to false (MyISAM).

=item B<--debug, -D>

Incremental, output debug info. You can repeat this option up to five times.
There're following debug levels:

=over

=item 1. show critical DB errors,

=item 2. show DB warnings as well,

=item 3. show full SQL statements which caused errors,

=item 4. show full stack trace on errors,

=item 5. show FUSE debug tracing output (really noisy).

=back

Default is no debug messages. See also L<--logfile|/--logfile, -l> to enable
debug output logging in daemon mode. If you don't set logfile in daemon mode
you won't see any debug output, no matter how many C<-D>s you put in command
line.

=item B<--daemon>

Boolean, if set the program will daemonize itself. Defaults to true. You may
wish to use it as C<--nodeamon> to debug the program.

=item B<--mkdir, -k>

Boolean, if set the program will try to create mountpoint directory if it doesn't
exist yet. Default is false.

=item B<--rmdir, -K>

Boolean, if set the program will try to remove mountpoint directory after exit.
Default is false.

=back

=head2 Store options into configuration files

FusqlFS leverages L<Getopt::ArgvFile> package to load configuration from files.

Long story short, you can put C<@filename> on command line, it will interpolate
contents of the file into command line. You can place as many @-clauses into
command line as you want. This way you can store some common options into a
file and use it in C<fusqlfs> invocation. For instance, you can place
credentials and database name into F<databaserc> file and then just call
C<fusqlfs @databaserc> to mount it.

As an alternative to @-prefix you can use C<-r> option instead to load
configuration from given file, so you can write C<-r filename> instead
of C<@filename>. This is useful to put into shebang line in fusqlfs config
file:

    #!/usr/bin/fusqlfs -r
    --user=root
    --password=pa$$w0rd
    --host=localhost
    --engine=mysql

Then you need to give execute permission to the config file with C<chmod a+x>
and run it directly from anywhere.

=head1 DESCRIPTION

This FUSE-daemon allows to mount any DB as a simple filesystem. Unlike other
similar "sqlfs" filesystem, it doesn't provide simple DB-backed file storage,
but given you full interface to all database internals.

Every table, view, function etc. is a directory, every single field, index,
record etc. is a file, symlink or subdirectory in the mounted filesystem. You
can create table "mkdir ./mnt/tables/tablename", and remove them with "rmdir"
afterwards. You can edit fields as simple YAML-files. All your usual file
utilities are at your service including "find", "rm", "ln", "mv", "cp" etc.

Just mount your DB and enjoy!

=head1 TODO

=over

=item * Implement MySQL support.

=item * Implement PgSQL triggers.

=item * Write better docs: describe FS structure, rules and precautions to use
it as DB admin tool.

=back

=head1 AUTHOR

E<copy> 2010, Konstantin Stepanov E<lt>I<mailto:me@kstep.me>E<gt>

=head1 LICENSE

This product is distributed AS IS without any warrantly under General Public
License v.3 or higher in hope it will be useful for somebody.

License text is included in F<LICENSE> file in this distribution.



( run in 1.494 second using v1.01-cache-2.11-cpan-39bf76dae61 )