I want to upgrade the postgresql 9.1 database to postgresql 11. First I want to get the data on the remote pg9.1 server with pg_dump from the pg11 server to make an experiment. How do I copy the database on the remote server to the new server with the new pg_dump.
The following code is using old pg_dump and it doesn't work.
ssh user # remote_machine "pg_dump -U dbuser -h localhost -C --column-inserts" \ >> backup_file_on_your_local_machine.sql
pg11 on the network connected to the old database by taking full dump I solved
pg_dumpall -U postgres -h 10.100.80.100 -p 5432 --clean --file=/pg11localstoragepath/backup/mydb_backup.dump
Related
I am using the docker MS-SQL server latest version and trying to restore the database (.bak) file using Azure data studio. But not able to find the physical location in MAC
As per the Azure data studio it points the data to the /var/opt/mssql/data however, we can't find the location on the MAC OS.
Docker SQL server command that I used to run the image
docker run --name MsSql -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=xxxxxxx' -p 1433:1433 -d mcr.microsoft.com/mssql/server:2019-latest
using the below command solve my issue, I have to mount the volume with the container volumn
docker run --name MsSql -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=FeteBird#sql' -p 1433:1433 -v /var/opt/mssql/data:/var/opt/mssql/data -d mcr.microsoft.com/mssql/server:2019-latest
I am trying to start a Alfresco server but it got hung in between,Please see below screenshot, I have copied Alfresco instance from one server to another server, I have also made necessary changes in Alfresco-global.properties.
Please help on this
For backup of your database and alf_data you can download and run the following script.
http://www.contcentric.com/alfresco-backup/
Note: you will have to manually backup the indexes from the solr4 folder and other customizations (like amps and jar deployed)
Follow the alfresco restore steps
1. Install new alfresco instance. Do not start server
2. Start postgresql using the following command
./alfresco.sh start postgresql
3. Go to the <ALF-HOME>/postgresql/bin
4. Run the following commmand
psql -U alfresco -h <hostname> -p port
e.g. psql -U alfresco -h localhost -p 5422
5. It will ask you to set the password, enter the password and remember it
6. Run the following command
psql -U alfresco -h <host> -p port <dbname> < dumpFile
e.g. psql -U alfresco -h localhost -p 5422 alfresco < /opt/migration-backup/01-10-2018-15-54-47/database/alfresco_db_dump
7. You will notice the multiple tables and index are created
8. Start the tomcat using the following command
./alfresco.sh start tomcat
9. Test your migration.
I'm trying to set up an OBDC interface to two different MariaDB instances and I'm completely mystified by the fact that one works and the other doesn't.
One db ("platan") is running on a regular MariaDB installation on CentOS7 on 3306, whereas the other db ("tlex") is in a MariaDB instance inside a Docker container on the same OS and running on port 3301. I have to keep those two instances separate.
Both databases are reachable from the command line:
mysql -u mrtlex -pPASSWORD -h 127.0.0.1 -P3306 tlex
and
mysql -u platan -pPASSWORD -h 127.0.0.1 -P3301 platan
let me connect without a hitch.
I have the MariaDB driver defined in odbcinst.ini:
[MariaDB]
Description = MariaDB Connector/ODBC v.3.0
Driver64 = /usr/local/lib64/libmaodbc.so
And I have two data sources defined in odbc.ini:
[tlex]
Description = TLex dockerized
Driver = MariaDB
Database = tlex
Server = 127.0.0.1
Uid = mrtlex
Password = PASSWORD
Port = 3301
[platan]
Description = MariaDB localdb
Driver = MariaDB
Database = platan
Server = 127.0.0.1
Uid = platan
Password = PASSWORD
Port = 3306
odcbinst seems to recognize both datasources:
[root#CentOS-73-64-minimal ~]# odbcinst -q -s
[tlex]
[platan]
Yet I can actually connect only to platan and not the tlex datasource:
[root#CentOS-73-64-minimal ~]# iusql -v tlex
[unixODBC][Driver Manager]Data source name not found, and no default driver specified
[ISQL]ERROR: Could not SQLDriverConnect
[root#CentOS-73-64-minimal ~]# iusql -v platan
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL>
This doesn't make any sense to me. I can access both databases from the command line, both databases are set up the same way as ODBC datasources, both datasources as listed with odbcinst -q -s yet I can connect to only one of them through ODBC.
What could be the reason? How could I further troubleshoot this?
Many thanks in advance.
In order for a dockerized MariaDB to be accessible via ODBC, the container itself has to have unixODBC installed as well as the MariaDB ODBC driver and the data source file.
I have created my Maria DB Instance under Centos 7 using the the following command
[username#localhost]$ sudo yum install mariadb-server
System Enabled and Started with the following Commands
sudo systemctl enable mariadb
sudo systemctl start mariadb
I have secured the installation with the following command
sudo mysql_secure_installation
The Server was secured and invoked the mysql prompt using
mysql -u root -p
There is no problem. I am able to use this command to get into SQL Command
However when I am trying to load tables, i am getting the following error
ERROR 1045 [28000]: Access Denied for user 'root#'localhost' (using
password: NO)
Unable to load data. What could be the solution
Thanks
Sreeram
Based on this link https://github.com/mseknibilel/OpenStack-Folsom-Install-guide/blob/master/OpenStack_Folsom_Install_Guide_WebVersion.rst#openstack-folsom-install-guide , I tried running these scripts but it fails despite me setting the HOST_IP & EXT HOST_IP.
./keystone_basic.sh
./keystone_endpoints_basic.sh
Below is the error log received:-
-keystone:error:unrecognized arguments: service id of 18ea5916544429bed2c84af0303077
I have provide the information such as tenant_name, tenant_id and so on in a source file but it happens to be the script provided does not get recognized by the system. Below are the details of the OS I use.
I created VMs instead of using physical machines. Installed with Ubuntu 12.04 LTS.
Please advice on how to tackle this issue.
Thanks.
I had the same problem. I am using Ubuntu 12.04 LTS. After running:
keystone help user-create tenant id appears as follows:
Optional arguments:
...
--service_id <service-id>
Change --service-id to --service_id with a global replace
[Using command line]
# sed -i 's/--service-id/--service_id/g' /path/to/script.sh
restart keystone & It's database entries
mysql -u root -ppassword -e "drop database keystone"
mysql -u root -ppassword -e "create database keystone"
mysql -u root -ppassword -e "grant all privileges on keystone.* TO 'keystone'#'%' identified by 'password'"
mysql -u root -ppassword -e "grant all privileges on keystone.* TO 'keystone'#'localhost' identified by 'password'"
service keystone restart
keystone-manage db_sync