Load database from offline back-up Neo4j - database

I backed up a neo4j database using
bin/neo4j-admin dump --database=neo4j --to=c:/
Then I load a database from an archive created with the dump command as follow
bin/neo4j-admin load --from=/var/lib/neo4j/data/c: --database=db
From Neo4j Enterprise Browser I execute
SHOW DATABASES
but I don't see the db previously loaded. How could I show it ?

If you are replacing your existing database with name "db" then use the --force option:
bin/neo4j-admin load --from=/var/lib/neo4j/data/c: --database=dbase --force
If you are restoring into a new database, then after the load, you need to create the database CREATE DATABASE dbase
Note that I changed the name of your database from db to something else since database names in Neo4j must be at least 3 characters long.

Related

Is the correct way to populate my database in Plesk using their Database tab, SSMS, My Little Admin, or some other way?

I cannot find much in the way of written instructions on how to copy my database to Plesk.
This page simply says, "To create a database and a database user: Go to Databases > Add Database."
And then it shows a screenshot which does not match what I have; specifically, it shows an "Import Dump" button which I do not have:
This is what I see in my session (no Import Dump button):
I zipped a .bak file of my database contents and uploaded it to the File Manager's Files section:
...but how do I move it from there to the Database area, and what do I then do to populate my tables with the contents of the .bak file?
Is this something that should be done using Microsoft SQL Server Management Studio, or from "My Little Admin," or what?
I was able to create the (empty) tables by running a script.sql file I generated from my local database. My Little Admin indicates that the empty tables do exist on the server, for example here is the ACTORS table:
OTOH, SSMS shows that the database exists, but shows no tables:

Cannot create a copy of a database with a new name by restoring from backup: "the database is in use"

I have two sets of databases for my different testing environments (internal qa and uat). I'm trying to bring qa up to date by restoring it from the latest uat backups. I encountered an issue with the qa DBs getting stuck in "restoring" mode and ended up deleting them, so I'm trying to create a brand new database now by restoring from the UAT backup and changing the name, but it keep failing.
Restore database
Source: device > latestUATbackup.bak
Destination: database > change name from UAT.Web to Dev.Web
Files > check off Relocate all files to folder
Options: Close existing connections to destination database
"Restore of database Dev.Web failed. Access could not be obtained because the database is in use"
I tried taking UAT.Web offline but then it fails with the error "UAT.Web cannot be opened because it is offline"
Why would it matter if the database is in use when I'm using a backup? What do I need to do?
You can't restore a database that is in use because the restore would put it in an inconsistent state. You need to disconnect all active connections (including all SSMS query windows and other applications) from the database in order to restore it. If it already exists make sure to check "Overwrite existing database" on the Options tab of the restore window.
On a side note, up to you but I would recommend not using a '.' in the database name. It can get confusing when using fully qualified object names that include the database.
Go to Options and tick the 'Close existing connections to destination database' option before restoring.

AWS SQL Server 2016 Restoring 2 Databases Error Message

I am testing to see if a SQL Server server based program can also work on AWS Cloud Server with 2016 SQL Server on the Amazon server. In order for me to test it, I need to restore 2 databases.
The first one eventually restored fine once i figured it out...restoring the database from my S3 "bucket" BAK file.
So then I tried to restore the 2nd database, using the same restore stored proceudre, and get this message:
[2017-12-28 02:44:22.320] The file 'D:\rdsdbdata\DATA\smsystemdata.mdf' cannot be overwritten. It is being used by database 'amwsys'.
[2017-12-28 02:44:22.320] File 'sm_system_data' cannot be restored to 'D:\rdsdbdata\DATA\smsystemdata.mdf'. Use WITH MOVE to identify a valid location for the file.
I can't find where to use the WITH MOVE because it won't let me restore it interactively through the Management Studio restore menu; instead I have to give it a stored procedure command:
exec msdb.dbo.rds_restore_database
#restore_db_name='sample99',
#s3_arn_to_restore_from='arn:aws:s3:::lighthouse-chicago/sample999.bak';
And each time it tells me it can't restore it because it's going to overwrite the first database's files.
Much thanks
bill
I think you are stuck in RDS's restriction.
I had the similar problem as you. Multiple restore from one DB instance is impossible at RDS.
Here is RDS's restriction you may encounter.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/SQLServer.Procedural.Importing.html
You can't restore a backup file to the same DB instance that was used
to create the backup file. Instead, restore the backup file to a new
DB instance. Renaming the database is not a workaround for this
limitation.
You can't restore the same backup file to a DB instance multiple
times. That is, you can't restore a backup file to a DB instance that
already contains the database that you are restoring. Renaming the
database is not a workaround for this limitation.
If you are in this case, you can't use .BAK file. To avoid it, you should create DB instance with DML and import table data.

Database Generator php and mysql

How do I create a database generator to allows a user to create his own table in the database without access to PHPMyAdmin and without any emphasized text knowlege about PHP or MySQL?
You at-least need the sql file to run so that the database can be created....
create the sql file (the whole backup of the database along with subroutines)
just load the database via this command
mysql -u'root' -p'password' databaseName < /path/to/file.sql
In order to run mysql, it should be in your environment variable..

Moving Magento to new server checklist

So I'm trying to manually move Magento to new server with old school ftp/phpmyadmin method. I only have the sql dump and folders from the root of old server, not access to it anymore and I don't know the earlier magento version number.
Should I
do fresh install of Magento to new server and then substitute folders and somehow import sql?
or
dump the files and sql to the new server first and then run the installer (something else?)
Many thanks
Usually below methods are followed,
Empty your cache admin sessions
Empty your logs (mysql)
create backup your database and your files
check your new server that supports magento using this
upload your files and import your db. If your database size is very large then directly import your database to your mysql server using sql command. Command would be like this,
mysql -u username -p database_name < file.sql
for this you need to logged in your server(mysql)
Update your mysql credentials to your etc file and update path in core_config_data table .
Place some dummy orders to check emails are correctly delivered and payment, shipping etc.
Buy SSL Certificates and avoid shared hosting.

Resources