restore database PgAdmin4 - postgresql

i am trying to restore database in PgAdmin 4 and getting an error
"[Errno 2] No such file or directory" with i assume is related to the the backup file, which is located in /Users/myuser/Downloads/dbupload (PostgreSQL installed on my local machine). This makes me believe that the issue is not with the file but with the link to the file.
In pgadmin 3 all is working ok and given that pgadmin was related a few weeks ago, i am not getting much support online.
Any assistance is highly appreciated.

This is already answered: "[Errno 2] No such file or directory" when trying to backup a database in pgAdmin4
And make sure you use pgAdmin4 file manager to locate your file & once your file is selected using file manager, it displays properly in Filename filed
/Users/myuser/Downloads/dbupload/< your_selected_restore_file >
if you see /Users/myuser/Downloads/dbupload/ means your file is not selected properly.

So, you have to go to OTHER LOCATIONS, then:
var/lib/pgadmin/storage/postgres_localhost
There, I created a folder called Backup and put all the backup files from the Databases.
Remember that you need to access these locations as Root.
You can do that either by installing Nautilus, then clicking with the right-button on the folder and Open as Administrator (you will be requested your password of course).

Related

Unable to connect Oracle database using SQL Developer in MACOS. Time zone error

I am using MAC OS. SQL Developer is not installed. Only zip file is in apolication folder. And when I click on the zip file, it extracts only one file - SQLDevelopr.exe. No others files or folders. Where do I find .conf file? And add my timezone?

Moodle 3.3.2+ Backup with cronjob which folder?

I success installing moodle 3.3.2+ in my VPS. I want to backup those moodle but not knowing which folders should i backup every day...
it is i think not wise to backup all folder in moodle instalation since it would be has very big size..
so could anyone suggest which folder is essential that got updated dynamically and should be include in my backup plan.
thanks in advance
Moodle stores uploaded content in a moodledata folder. To check the path to that folder, take a look in config.php file in the root Moodle directory and search for $CFG->dataroot. This folder as well as the database should go in the backup. The Moodle code itself (unless you have custom changes you want to keep) can be obtained from moodle.org if it is necessary.
See the Moodle docs for more info: https://docs.moodle.org/33/en/Site_backup

php_warning on installing ext

I want to intstall the ext "my_redirects". On my local machine it does what it should. But now, on the live site, i got this error:
1: PHP Warning: file_get_contents(/kunden/homepages/28/d574274134/htdocs/update7/typo3/sysext/core/Resources/Private/Sql/Cache/Backend/Typo3DatabaseBackendCache.sql): failed to open stream: No such file or directory in /homepages/28/d574274134/htdocs/update7/typo3_src-7.6.14/typo3/sysext/core/Classes/Cache/Backend/Typo3DatabaseBackend.php line 441
I got a hint to delete the typo3temp/autoload/ files. Then the installation works, but if i after that go into the install tool, i get this error again. Can someone give a hint?
This file is part of the core and must exist. Look into the src-tar/zip file. Maybe the file wasn't transferred to the server.
I don't think it's an autoload issue, because the .sql file is missing, not the PHP class.
Please verify that the sql file does exist. If it's missing, check the hash of your downloaded TYPO3 core. Make sure you compare the correct path on the server.
But I guess you got an access restriction. Maybe bad ownhership of that .sql file? Perhaps you ran into some security problems with file_get_contents() and at least sql files? So please also check your security settings.

pgAdmin4 import file error - can't find file

I'm having a problem importing a csv file to pgAdmin4 on a mac - it simply can't find the file. This is so simple that I'm hoping there's just a setting I've failed to set up.
In the import/export data function on a table, there is the Import/Export dialog that looks like this:
However, it can't find the file:
That error looks like the standard python error when you give it the wrong path to a file. But it's correct - that's where the file is: '/tmp/person616.csv' - I didn't even enter the name/path, I browsed to it.
Has this happened to anybody else? Know how to fix it?
The exact problem has been bothering me for quite some days now. There are not much resources available to address it. So here's what I did:
I created a new folder giving it a strange name making sure that it is unique under the "/" directory and in the pgAdmin4 panel you're in rn.
I used below commands to find the new strange named folder that I just created: (i) sudo su (ii) find -iname [strange named folder] -type d
And after some time here it was. My path was revealed.
In my case, the path was
/var/lib/pgadmin/storage/[pgAdmin4_username]
I suspect that path for "PostgreSQL Binary Path" is not set properly in pgAdmin4.
In pgAdmin4 Goto:
File > Preferences > Paths > Binary paths > PostgreSQL Binary Path
Sample paths as below (You need to change it according to your Postgres location),
If you are using Windows than provide path like,
C:\Program Files\PostgreSQL\9.6\bin
If you are using Linux than provide path like,
/opt/PostgreSQL/9.5/bin
If you are using Mac than provide path where you have installed PG,
/Library/PostgreSQL/9.6/bin
And try again.
I just had the same problem and found the solution. PGAdmin4's root directory is not your root directory. It starts at
/home/[your_username]/.pgadmin/storage/[your PGAdmin_username]/
So if you put your file or backup directories there, it can find the files.
It also helps to have it show "all" files in the backup dialog, so it can find files with your own extensions. e.g. I use `filename.custom' which it doesn't recognize.
In pgAdmin, when you right-click on a database and click Restore, in the bottom-right corner of the mini-interface, just above the Select button, you can see Format 'dorpdown-list'. Make sure that the drop-down list isn't limiting your displayed files, so select All Files.
Right click on table > import/export >
Toggle "Import" mode > select file >
Upload Files then select each for every table

Move / backup Netbeans FTP profiles

Trying to figure out how to transfer / back remote connections in netbeans. I have over 100 that I would like to move to a backup computer. Recreating every one of them would be extremely time intensive. I cannot find any way to export the remote profiles and I haven't been able to find the profiles in the .netbeans directory on the local computer.
Is there a file, or any method that would allow moving or backing up the FTP profiles.
The location changed in Netbeans 7.2. The path is the same except AppData\Roaming instead of AppData\Local.
If you are setting up a new windows machine to run Netbeans, you need to first create a dummy remote ftp connection so Netbeans will create the last folder in this file path. Place the .properties files here and then restart Netbeans.
C:\Users\[windowsUsername]\AppData\Roaming\NetBeans\7.2.1\config\Preferences\org\netbeans\modules\php\project\RemoteConnections
The path on Windows would be:
user\.netbeans\6.7\config\Preferences\org\netbeans\modules\php\project\RemoteConnections
For Windows 10:
C:\Users\ (username) \AppData\Roaming\NetBeans\ (netbeans_version) \config\Preferences\org\netbeans\modules\php\project\RemoteConnections