Does runtime Sphinx need the conf file? - sphinx

If I create run my conf file on my index can Sphinx search then run w/o the conf file or associated wordforms for user search or are those files still needed for reference? My understanding so far is that when you process the index with rotate the .idx itself contains all that information needed? Basically trying to release production version of the search and not expose the config/wordforms on the server.

You will need the config file on the server, it contains some important stuff.
(like getting the list of indexes, and the folder to load them from. As well as log files, pid file paths etc)
... you could perhaps get away with having a simplified config file, that doesnt list all of the settings for the index. Just the name and path would probably be enough. As the rest would be read from the .sph file.
BUt as they .sph file is on the server, the config can be recreated from it, so by not providing a config file, you just making it slightly harder to access the index config, not impossible.
... small wordform files may be embedded in the index file for simplicity, but if the file is big, searchd will load it direct from the file. (only the path stored in the sph file)
Honestly dont see what you hope to gain by being secretative about the index data. Its in the index files anyway.

Related

Moving existing MongoDb deployment to directoryperdb by moving files instead of dump/restore

I'm currently trying to move my existing MongoDb deployment to the --directoryperdb option to make use of different, mounted volumes. In the docs this is achieved via mongodump and restore, however on a large database with over 50GB compressed data this takes a really long time and indices need to be completely rebuilt.
Is there a way to move the WiredTiger files inside the current /data/db path, just how you would when just changing the db path? I've tried copying the corresponding collection- and index- files into their subdirectory, which doesn't work. Creating dummy collections and replacing them with the old files and then running --repair works but I don't know how long it takes since I only tested it with a few docs large collection, this also seems very hacky with a lot of things that could go wrong (for example data loss).
Any advice on how to do this, or is this something that simply should not be done?

is it possible to truncate sys_file_processedfile?

I am stuck with a sys_file_processedfile table with more than 200.000 entries. Is it possible to truncate the table and empty the folder /fileadmin/_processed_ without destroying something?
Thanks!
It is possible.
In Admin Tools (Installtool) under Maintenance there is a card named Remove Temporary Assets which you should use to do so.
TYPO3 stores processed files and cached images in a dedicated directory. This directory is likely to grow quickly.
With this action you can delete the files in this folder. Afterwards, you should also clear the cache database tables.
The File Abstraction Layer additionally stores a database record for every file it needs to process. (e.g. image thumbnails). In case you modified some graphics settings (All Configuration [GFX]) and you need all processed files to get regenerated, you can use this tool to remove the "processed" ones.

Storing data in array vs text file

My database migration automation script used to require the user to copy the database names into a text file, then the script would read in that text file and know which databases to migrate.
I now have a form where the user selects which databases to migrate, then my script automatically inserts those database names into the text file, then reads in that text file later in the script.
Would it be better practice to move away from the text file all together and just store the data in an array or some other structure?
I'm also using PowerShell.
I'm no expert on this, but I would suggest keeping the text file even if you choose to use the array or form only approach. You can keep the text file as sort of a log file, so you don't have to read from it, but you could write to it so you can quickly determine what databases were being migrated if an error happens.
Although in a production environment you probably have more sophisticated logging tools, but I say keep the file in case of an emergency and you have to debug.
When you finish migrating and determine in the script that everything is as it should be, then you can clear the text file or keep it, append the date and time, and store it, as a quick reference should another task come up and you need quick access to databases that were migrated on a certain date.

mongodb create database file automatically after certain period

Mongodb Database generate files automatically after certain period as follow
Doc.0
Doc.1
Doc.2
Doc.3
Doc.4
but Doc.ns file never regenerate like above file
I'm not sure exactly what, if anything, you are specifying as a problem. This is expected behavior. MongoDB allocates new data files as the data grows. The .ns file, which stores namespace information, does not grow like data files, and shouldn't need to.

The raw text files that make up SQL inside data directory in Postgresql

Is there a way someone can get the text files that make up the Database I mean the raw text files that you get when you dump the db.? I am thinking the files must be somewhere inside the data directory...How can I get them?
They aren't in a text format. If you can't figure out where the raw data files are kept either by looking or reading the documentation you're unlikely to be able to make much use of them.
I think this is what's known as an XY question - try asking a question about what you're trying to achieve.
Jeff,
Your answer depends on whether you have a tablspace or not. If the database has an associated tablespace, then that will dictate where the physical files are located. A table space tells the database where to store the physical files on the disk.
All the data needed for a database cluster is stored within the cluster's data directory, commonly referred to as PGDATA (after the name of the environment variable that can be used to define it). A common location for PGDATA is /var/lib/pgsql/data. Multiple clusters, managed by different postmasters, can exist on the same machine.
For Windows, the subdirectory containing symbolic links to tablespaces is located here: C:\Program Files\PostgreSQL\9.0\data\pg_tblspc\.
You can read more on database physical storage in the PostgreSQL Documentation online, located here. The database file layout is further discussed here.
Since we're not sure exactly what you're trying to do, you will definitely want to read the incredibly-abundant PostgreSQL online documentation before you attempt to move data at the file-level. You will also want to do further research on StackOverflow, as you'll find answers such as this one that discuss transferring PostgreSQL data.
Also, have a look at the Backup and Restore documentation while you're at it.
Enjoy!