Storagegroup table
From MythTV Official Wiki
Revision as of 10:28, 3 September 2013 by Davemc (talk | contribs) (More detail on storagegroup records.)
Note: The correct title of this article is storagegroup table. It appears incorrectly here due to technical restrictions.
The storagegroup table contains the Storage Groups that are configured in mythtv-setup.
Table Description
Field name | Type | Null | Key | Default | Extras |
---|---|---|---|---|---|
id | int(11) | PRI | NULL | auto_increment | |
groupname | varchar(32) | MUL | NULL | ||
hostname | varchar(64) | MUL | NULL | ||
dirname | varchar(255) | NULL |
Fields
- id is a unique identifier for entries in this table.
- groupname is the name of the Storage Group.
- dirname is the directory of the Storage Group.
Example Entries
id: 1 groupname: Default hostname: localhost.localdomain dirname: /video/recordings/
Commonly used groupname field values
Default Videos Fanart Trailers Coverart Screenshots Banners DB Backups LiveTV Streaming
On a new install, the default base dirname is /var/lib/mythtv/ so the matching dirname are
/var/lib/mythtv/recordings/ /var/lib/mythtv/videos/ /var/lib/mythtv/fanart/ /var/lib/mythtv/trailers/ /var/lib/mythtv/coverart/ /var/lib/mythtv/screenshots/ /var/lib/mythtv/banners/ /var/lib/mythtv/db_backups/ /var/lib/mythtv/livetv/ /var/lib/mythtv/streaming/
SQL
If you want to add another block of entries, because say you have another volume with storage, use this sql. The id column is left out because it auto-increments during the insert. phpmyadmin is an easy to use tool for applying sql.
Check your sql has the intended result first
select groupname,hostname,concat('/srv/',substring(dirname,10)) as newdirname from storagegroup;
Then apply the block copy
insert into storagegroup (groupname,hostname,dirname) select groupname,hostname,concat('/srv/mythtv/',substring(dirname,10)) as newdirname from storagegroup;
10 rows inserted.
See also Storage_Groups for how these entries are used.