pgadmin 4: Exporting .tar file - postgresql-9.6

I am trying to use pgAdmin 4 on my personal laptop (Windows operating system with PostgreSQL 9.6) to export a database as a .tar file. I had issues importing csv through the Import/Export tool as well, and could only import successfully when doing the following:
COPY public.build_info FROM 'C:\time_table.csv' CSV HEADER;
I have read a few questions that resort to backing up a database through the command line, but I am hoping to complete this within pgAdmin4.
My current steps are:
right click my database (in this case Housing_DB)
Choose my directory to save (same place the csv files were imported from)
Add additional information (encoding, file type, name, etc.)
I get an error immediately connected to Permissions, but have struggled to determine how to fix this issue:
Does anybody know how I could go through and provide permissions to be able to back up this database? I have looked at the documentation pertaining to backup/restore but did not see anything covering permissions (https://www.pgadmin.org/docs4/1.x/backup_dialog.html).

It looks like your C:\ is protected by administrator account which can't be written by user postgres. Can you try again with locations like your 'Desktop' or 'Temp' folder.

Related

How to find Couchbase Mobile DB file in iOS?

I want to find Couchbase Mobile DB file location in iOS and please also describe how to open db file?
Thanks
If you are using CBM 1.4 or earlier, you can locate the location of the cblite2 db file as discussed here
https://developer.couchbase.com/documentation/mobile/1.4/guides/couchbase-lite/native-api/manager/index.html#dude-wheres-my-database-file
To view the database , you can use CouchbaseLiteViewer which is (not officially supported ) Mac application
https://github.com/couchbaselabs/CouchbaseLiteViewer.
You could also use any sqlite browser such as http://sqlitebrowser.org to browse the sqlite content
CouchbaseLiteViewer is not updated for checking data in Cblite 2.0 , i
waiting for it so as of now following way check Cblite db data and it
will work.
Latest solution Couchbase 2.0 db check:
There is a command line tool which I believe is inside the zip file that you download to get Couchbase Lite (look in tools) called "cblite" which is similar to the sqlite command line tool. It can perform operations on a database such as listing documents, querying, etc.
Download Couchbase sdk from the website
It comes with the folder inside this, there is a folder called Tools .
Screenshots for reference :
3.Inside tools cblite is there , just launch it . now suppose i have cblite db .
Use following way to query and this tools provide you comannd terminal way to search data/document :
I tried this and it works 👍
shobhakar$ ./cblite /Downloads/mobile-travel-sample-master/ios/TravelSample/TravelSample/prebuilt/travel-sample.cblite2
Opened database /Downloads/mobile-travel-sample-master/ios/TravelSample/TravelSample/prebuilt/travel-sample.cblite2/
This is the current solution and this is awesome.
Reference link : https://github.com/couchbase/couchbase-lite-ios/issues/2176#issuecomment-423921463

How to import SMS backup file(CSV format) took from Android to iPhone

I have a SMS backup(CSV format) file exported from Android where each record is the text message. I want this file to be imported to iPhone programmatically. Could anyone help me how to do this in iOS. I'm not getting any resource for doing this so for.
Any help is appreciated.
Recently, I succeeded extracting message records from iPhone backups. I generally understand the mechanism/design of iPhone backups. So I hope I can give you some hints in theory to do it.
The possible steps:
Create a unencrypted backup from iPhone to your OS X devices through iTunes. But make sure DO NOT check the option "Encrypt iPhone backup" since you are going to update (import your SMS backup) the backup.
Find the backup you just have done. My OS X is 10.12.6, the directory is /Users/your user/Library/Application Support/MobileSync/Backup/
Then, go into the directory Backup/ and find the directory for iPhone Message. Mine is /Users/myusername/Library/Application Support/MobileSync/Backup/7aded5a6a493ac0b3c41cc930a5421ca035610b5/3d/3d0d7e5fb2ce288813306e4d4636395e047a3d28
As I known, there is only one directory under Backup/, and the following path "3d/3d0d7e5fb2ce288813306e4d4636395e047a3d28" is all the same for every backup. So hopefully you will find it without problems.
The file 3d0d7e5fb2ce288813306e4d4636395e047a3d28 is a SQLite DB. Copy and paste it to somewhere easier to reach for a SQLite visual tool called "DB Browser for SQLite". (If you prefer using command line just type sqlite to enter and use command ".open 3d0d7e5fb2ce288813306e4d4636395e047a3d28" to enter the DB)
After you open 3d0d7e5fb2ce288813306e4d4636395e047a3d28 with SQLite you should see:
Here are 10 database tables. The key tables are message (text, date, handle_id etc.) and handle (contact list).
Now it's the time to use your SMS CSV file to import into the SQLite DB. To do this, you need the knowledge of inserting data to db from csv files, and the backup database schema by understanding the tables showing in the pic.
After inserting your SMS CSV file, replace the 3d0d7e5fb2ce288813306e4d4636395e047a3d28 in the iPhone backup. Finally you can use iTunes to recover your iPhone from this backup.
Hope all above will give you some ideas. Cheers!

Delphi Database Connection to C:\ProgramFiles

I'm using the software Inno Setup in order to create an installer for my program, this installs the program to the C:\ProgramFiles(x86) folder, so Im linking my database connection to this new folder, however it won't let me link it as it says I don't have permission.
I am unsure of how to combat this error, as the database is the key part of my program and without it my program wont work.
Putting a database under C:\Program Files or C:\Program Files (x86) is not a good idea. Non-admin users don't have write access to those folder, and you should never give write access to it.
To be Windows conformant, you have two possibilities:
When your program starts the first time, copy a template database to the user's profile under %AppData%\companyname\prgname and use that from now on.
if you need different users to work on the same database, put the database under %ProgramData%\companyname\prgname instead, and don't forget to give user's write access to that folder.

Kettle over kettle transform file pentaho CDE

Facing issue regarding kettle over kettle transform step in pentaho CDE, i have created transformation file and it is working perfectly.
Properties of kettle over kettle transform step where i have option of select transformation file, so when i am browsing it i am able to see only 3 folders home,public, etc..
So where i have to keep my transformation file so that i can able to access it while selecting from select transformation file.
You can create a separate folder/directory (e.g.: Transformations) inside any of the already present directories (say: Admin). Next refresh your repository/cache and you will be able to see the files. Link it from your CDE.
Now ideally when building a project, i used to have a separate folder with my project initials say PROJECT. Inside this folder, i used to create the rest of the sub-folders. This helps in separating the project codes.
Hope this helps :)
Edit:
The files in user console cannot be accessed from your local system post pentaho version 5. The only way to upload or download file is either to load it from User console or execute commands from command line. Check the below link. The files are internally stored in jackrabbit repository of pentaho bi server.
http://infocenter.pentaho.com/help/index.jsp?topic=%2Fadmin_guide%2Ftask_import_export_repository.html
Extra note: If you still want to access the files, there is REST API to handle most of the pentaho bi server capabilites. You may check this link also: http://help.pentaho.com/Documentation/5.2/0R0/070/010/0A0/0Q0#

Unable to open sql store file used in iOS application

I am using a sql based database in one of my application with Core Data framework. I have not enabled any file protection for persistent store (using NSFileProtectionKey). But I am unable to open my database file store in a directory under 'Caches' folder in Library.
Have you ever come across such an issue. Below is the image I am getting when I try to open the sql file. However, a difference from iOS 6 I could see in that folder is there are two additional files (-shm and -wal) present with the same name of the sql store file.
Could anyone please help me to find a solution to open the file.
The -shm and -wal are journal files created using write-ahead logging. You need all 3 files for a complete database. I haven't seen an encryption error falsely triggered by not obeying this rule, but it doesn't seem out of the question.
See https://developer.apple.com/library/mac/qa/qa1809/_index.html and http://asciiwwdc.com/2013/sessions/207.

Resources