Moving Raw MYSQL Data Files to a Different Directory - mysql-management

I have a directory only backup of a previous server that hosted multiple sites. I had access to a few .sql backups for our databases, but there were some that had not been backed up in that fashion. I located the .MYD,.frm, and .MYI files for the tables in my db in the var/lib/mysql/db_name directory.
I would like to know if there is a way to get the data from these files and move them into the new existing mysql installation? I tried copying the files from the db folder to a db folder with the exact same name, but I still get a "Can't find db_name/table_name.frm" error when trying to access any of the tables. They do show up in phpmyadmin table list, the error comes up when trying to access the tables.
Is this possible? If so, how do I go about taking these table files and turning them into use-able data?
I am sorry if my question or explanation doesn't make any sense. This is part of an ongoing 11+ hour emergency server recovery project that got sprung on me today, so my brain is fried. I will answer any questions necessary.

Have you checked that the files in /var/lib/mysql/db_name/ are owned by mysql and not root? Usually copying the files in should 'just work' (certainly it has and does for me). I assume you're using the same or very similar version of MySQL?

You really need to restore everything relating to that database, including also the matching 'mysql' database for your previous installation.

Related

Where are Azerothcore Server Databases Saved (after server has gone live)?

Where are the Azerothcore Server databases saved once the server is live with characters and changes etc.
I made several versions of the azerothcore folder as I was troubling shooting various modules and each location seems to be tied to the same server databases?
I would like to back up my server and also delete the extra folders.
thanks
AzerothCore uses a MySQL/MariaDB database server, containing 3 databases:
acore_world for the world objects (quests, NPCs, etc..) you probably don't want to backup this (instead you should back up your own custom SQL scripts if any, not the entire world)
acore_characters and acore_auth respectively, everything related to the characters and accounts, you do want to have regular backups of them
There are plenty of ways to backup your MySQL/MariaDB database(s) and you can find plenty of tutorials online about how to do it (it's a generic thing, not strictly related to AzerothCore).
You can try this tool as well, which creates backup and automatically sends them to you via Telegram: https://github.com/azerothcore/telegram-automated-db-backup
I ended up using MySQL Workbench to export the acore_auth and acore_characters separately as self contained sql files, then re-importing them upon server rebuild.

How to check all artifacts in Artifactory if their files exist on disk?

We are running a local installation of Artifactory Pro which contains around 1M artifacts. Recently, we tried to migrate from the embedded Derby DB to Postgres and switched back to Derby because of errors occurring during the migration.
After that, users reported missing files, mostly maven-metadata.xml but also at least one pom.xml. The files are missing on the filesystem.
The only way I can think of is to query the Artifactory API for all files, try to download them and check if they can be downloaded. Is there a better way to check all artifacts in Artifactory if they exist on the filesystem?
Welcome, Thomas! 👋🏻
Although that kind of errors don't happen in normal operation, data migration back and forth of a large number of artifacts can lead to those problems sometimes.
We have a user plugin find them, so check it out, looks like it is exactly what you need.

Intersystems Cache' PCK file usage

I'm working with a customer using the InterSystems cache' database environment and they are asking what's the best way to deal with the .pck file that's part of the database structure. When I attempted to research this to understand their ask, I came up short nearly every place on what this file is, where it's located, and how or why it's problematic.
any advice would be helpful
tom
Since we got that you talk about LCK file, it becomes more clear.
Well, lck file, is a kind of lock file, for databases in Caché. Which should be close to the mounted database (CACHE.DAT file) all the time when the system is running, preventing to use this database to write from another Caché instance. While Caché correctly shutdowns it is clear lck files created before.
While you touched backup theme for Caché Databases. I can say if lck files appeared to be backuped as well, something going wrong in a backup process. Depending on a way chosen to backup databases, you should not even have lock files existed during a backup process. Or you just should not backup it. While you mentioned freeze in comment, in this case lock files can still exist, and just have to copy only CACHE.DAT, it should be safe. But without freeze copy databases from working server quite dangerous, and nobody can guarantee that database will not have integrity errors.

Save Downloaded File in www Folder ionic 2

I'm creating an app where users need to work with large databases. Rather than having the users download the data and populate an SQLite database on the client (which would take a long time), I'm hoping I can use downloadable, pre-populated databases.
I found cordova-sqlite-ext, which allows working with pre-populated databases, but SQLite files must be located in the www folder for this to work. Is it actually possible to download files to this folder in Ionic/Cordova (on non-rooted devices)?
It's always good practise to store your files in app's directory. Check this comment of mine and see if it helps you:
https://github.com/driftyco/ionic-native/issues/881#issuecomment-270832521
I had a requirement of downloading a zip file(with sqlite file in it), unzip the file, store the file in app's directory and query the DB. I was able to achieve it using plugins and works quite well.

Drupal to Drupal Migration Across Servers

I am in the process of migrating a D7 site from one server to another. I have successfully exported and uploaded the settings to the new site using Features, but I need to get the content over to the site as well. I've been looking at several modules to try and solve this problem, but I have not found anything suitable for this task. Please let me know if I am overlooking a really simple solution.
Thanks!
Mark
Easiest solution is to export a database dump and import it into your new server. You can do it wotj phpMyAdmin but I recommend using Drush.
This way you can simply do a database dump via:
drush sql-dump > ~/sql-dump-file-name.sql
and later import via:
drush sql-cli < ~/sql-dump-file-name.sql
Also copy your files directory from old server to new server which is located in /sites/default/files.
I've successfully used the backup and migrate module for these tasks. True, creating a dump and then spooling the dump into the other database works, but this typically also copies all caches.
The backup_migrate module allows you save backups on your local server, but also to your hard disk, from where you can upload it again to the other site.
A neat thing here is that you can exclude tables, such as cache tables, which makes the transfer much faster.
Obviously you need a core installation on the other end, and the backup_migrate module already installed for this to work, but I assume that since you only ask about the db, you must have mirrored the file structure already (excluding the settings files).

Resources