Where files are allocated in Parse Server? - parse-platform

I'm implementing an instance of Parse Server, I want know where the Parse Server Allocated the files ?

According to File Adapter, the default file storage is GridFS in mongodb.

Depends on the operating system and type of installation you used.
If installed on a linux/unix using the global install npm install -g parse-server mongodb-runner then your parse-server files will normally be under usr/lib/node_modules/parse-server. ( may differ from linux versions )
be careful when editing these files for hot hacks or modifications. If you later choose to upgrade parse-server they will be overwritten.
Your cloud file directly is normally created by you. So this could be home/parse/cloud/main.js. This can be in any location of your choice. To set a new location you will set that in the index file or json (depending on your startup process ).
cloud: '/home/myApp/cloud/main.js', // Absolute path to your Cloud Code
If you installed not using the global install, then obviously you would need to cd to where you cloned the project.
Windows would be similar. Clone (or download the zip) parse-server from the repo. Open a console window and “cd” to the folder where you have cloned/extracted the example server, eq:
cd "C:\parse-server"
Here is where the files will sit on the parse-server. Hopes this helps!

Related

ImportRDF command uses appdata/local instead of appdata/roaming for repository location

Installed/running Ontotext GraphDB v10.1.0 (free desktop windows). All working fine, create repositories, run SPARQL, etc.
The server and UI are both loading/running/reporting repositories in the C:\Users<Username>\AppData\Roaming\Graph\data\repositories folder.
However, when running the ImportRdf.cmd utility, its "attaching to"/creating the repository in C:\Users<Username>\AppData\Local\Graph\data\repositories folder instead!?
Tried adding the correct path into C:\Users<user>\AppData\Local\GraphDB Desktop\app\GraphDB Desktop.cfg but makes no difference.
Anyone experienced this/got any fixes?
The data /repository/ directory can be set through the system or config property graphdb.home.data. The default value is the data subdirectory relative to the GraphDB home directory. For example, one way to configure it: Go in bin folder of graphdb distribution and start graphdb with the following command:
./graphdb -Dgraphdb.home="full path to where you want your repo directory".

Is there any way to inspect the contents of the RocksDB instance used by NEAR Protocol?

Disclosure: I work with NEAR and am currently on-boarding.
When I start up a local node on a clean machine I see that a .near folder is created in my home directory with a few configuration files (exact files seem to depend on which start_ script I run). Another folder appears inside of the .near folder called data.
Running strings ~/.near/data/*.sst in the folder spits out a few lines starting with the string "rocksdb" which led me to this reference to RocksDB
Is there any way to inspect the contents of a node's RocksDB instance?
I found Keylord but it crashes when I try to configure a new connection to the database (by pointing the connection to ~/.near/data). I didn't pursue that thread.
PSA1: sometimes it's useful to backup the ~/.near folder between node restarts if you want to reset the environment or avoid reusing old data while troubleshooting
mv ~/.near ~/.near_`date +%Y-%m-%d.%s`
PSA2: on MacOS you can watch what happens to the contents of the ~/.near folder while the node boots up and runs. (brew install watch).
watch -d -c -n 0.5 find ~/.near
The content of RocksDB is serialized using our own binary serialization format (http://borsh.io/), so you won't be able to examine the content with general-purpose third-party tools

backup collabnet subversion edge to another hard disk

I've installed Collabnet Subversion Edge, and would like to make sure I have it backed up properly. I would like NOT to use the CloudBackup service offered.
I've went to the administration interface for collabnet (localhost:3343) and went to Repositories > Backup Schedule. There, one can choose between 3 different 'Type of Job':
Cloud Services Backup
Full Dump Backup
Hotcopy Backup
Neither lets you choose where to copy the backup. I've tried looking up how this works, but documentation seems to be lacking a lot.
What is the best way to backup such a repository? Shall I just keep a copy of the entire collabnet folder (c:\csvn)?
The Subversion Edge admin UI lets you specify the folder for backups. It defaults to a folder inside the normal data folder, but you can specify a different value. So, for example, if you have a D:\ drive that you want the backups to go on you can just specify that folder in the settings and the backups will go to that folder.
It does need to be a physically accessible hard drive though.
See the Backup Directory configuration item in this screenshot:
https://ctf.open.collab.net/sf/projects/svnedge/screenshots/screens/config/config.png
You can use Windows Server Backup to backup Subversion repositories. It allows you to shedule backups
to a network share, dedicated backup volume, writeable media. For example, wbadmin command-line tool allows you to safely backup your repositories. This simple command performs one-time copy backup of C:\foo\bar to X:\ volume:
wbadmin start backup –backupTarget:x: -include:c\foo\bar -vsscopy
(To install Windows Server Backup, run ocsetup WindowsServerBackup in elevated command-prompt).
You can setup backup in different ways:
wbadmin command-line tool,
PowerShell cmdlets, good for automation and customization of backup actions,
Windows Server Backup wizard (control panel, actually) MMC snap-in.
It's not required to stop server's service when you run the backup because FSFS repository backend is always in consistent state.
Here are general tips about recovering Subversion repository from a backup:
Recover repository backup to an empty directory to make sure that restored repository files won't mix with files of the broken one. After repository if recovered, you can delete broken repository and then replace it with the recovered one.
Stop-start cycle your Subversion server after recovering repository from a backup.
If your clients get errors after repository recover, run svnadmin recover against it. The command finishes instantly and makes repository accessible again.
If you have access to the repository directories then you should be able to use hotcopy directly and specify where the backups go.
It's enough to take a periodical backup of just csvn/data directory where all your repositories and configuration files are stored.
Visit this link for backup (and upgrade) options. The contents in the link is added below. Hope it helps.
Manual Upgrade/Reinstallation Steps
Subversion Edge includes an integrated mechanism for installing updates. This is the preferred way to do an upgrade as it handles whatever steps are needed to perform the upgrade and can be done remotely from your web browser. However, there are scenarios where you might want or need to do an upgrade manually, for example your Subversion Edge server might not be able to access the Internet to pull down the updates or maybe one or more critical installation files have become corrupted and you need to reinstall using the same version. Here are the steps for performing a manual upgrade or reinstallation:
Windows
If your existing Subversion Edge installation was installed using the installer from Subversion Edge 2.0.0 or later, then all you need to do to upgrade is download the latest installer and run it. This will uninstall the current version and install the new version (which is how the Windows Installer (.msi) process works for upgrades).
If you are not sure what version you installed with, you can always safely use this approach:
Stop the existing services and uninstall the current version from the
Windows Control Panel. This will leave behind your C:\csvn folder and
any files in it that have been modified since the original install.
Delete everything in the C:\csvn folder EXCEPT the data folder. So
you should be left with just the C:\csvn\data folder.
Install the new version. The installer will pick up the existing data folder and when the services start it will basically just be an upgrade to the new
version.
WARNING: Take note of this reported bug and backup the svn_access_file first:
artf7081 - Using Windows installer for updates can overwrite the svn_access_file
Linux/Solaris
To upgrade a Linux/Solaris installation, this is the safest way to do it:
Stop the servers $ bin/csvn stop $ bin/csvn-httpd stop
Rename the csvn folder $ mv csvn csvn-old
Untar the new release as a non-root user
Move the data folder back into the new release
$ mv csvn-old/data csvn
Important! Copy "dist" configuration files to data folder
$ cp -f csvn/dist/*.dist csvn/data/conf
Start the servers
$ bin/csvn start
$ bin/csvn-httpd start

How to setup Pydevd remote debugging with Heroku

According to this answer I am required to copy the pycharm-debug.egg file to my server, how do I accomplish this with a Heroku app so that I can remotely debug it using Pycharm?
Heroku doesn't expose the File system it uses for running web dyno to users. Means you can't copy the file to the server via ssh.
So, you can do this by following 2 ways:
The best possible way to do this, is by adding this egg file into requirements, so that during deployment it gets installed into the environment hence automatically added to python path. But this would require the package to be pip indexed
Or, Commit this file in your code base, hence when you deploy the file reaches the server.
Also, in the settings file of your project if using django , add this file to python path:
import sys
sys.path.append(relative/path/to/file)

squirrel sql client settings folder location

I installed the squirrel client 3.4.0 on my windows 7 64 bit machine.
I see a squirrel client settings folder
".squirrel-sql"
created in:
C:\Users\ayusman\
Is there any way I can specify the folder location to be in my squirrel install location i.e.
"C:\tools\dumps\Squirrel-3.4.0"
location?
The reason I want to do this is to make my squirrel set up easily movable between machines; I could just take the dump of the application and I will be ready to go on any machine.
Also is there a Squirrel-sql distribution that does not do the installation; but rather just a simple zip file that I can unzip to any location and start working?
About the local settings directory of SQuirreL:
SQuirrel SQL is an application written in Java and it uses the Java System Property user.home to store the local configuration files. Per default, this Java Property points to the home directory of the user. You can change this by the following steps:
Open squirrel-sql.bat in a text editor and navigate to the end of the file. One of the last lines should start with "start "SQuirreL SQL Client" - you have to change this line. Add -Duser.home=PathToStoreTheSquirrelConfigDir just after the -Xmx argument and ensure, that the new Argument is separated by a space from the others.
Here an example:
-Xmx256m -Duser.home=C:/temp -Dsun.java2d.noddraw=true
Note, that I use the slash and not a back-slash!
Now you can move the existing .squirrel-sql directory to the new place.
e.g C:\temp\.squirrel-sql
Now, if you start SQuirreL SQL, it will use the new storage location. You can verify this in the global properties of SQuirrel (see the section SQuirreL paths)
About the installer version of SQuirreL:
SQuirreL SQL also offers a plain zip instead of a installer version. Here is the link to the latest stable version
SQuirreL is offering 3 packages (base, standard, optional). The difference between them are the packaged plugins. I use the optional package - but the standard package is also fine.
You can use the Squirrel-Parameter --user-settings-dir, but unlinke the other answer with -Duser.home you have to use the actual Squirrel-Settings-Directory, e.g. the one with all the xml-Settings files and the folders logs and plugins.
You can use that parameter on the .jar / main-class directly, but also on the squirrel-sql.bat or squirrel-sql.sh file, so you don't need to edit those.
Example:
C:\dev\squirrel-sql\squirrel-sql-3.9.0\squirrel-sql.bat --user-settings-dir=C:\dev\squirrel-sql\squirrel-sql-settings
This is from the Squirrel-Manual, strangly enough, i couldn't find an online-source for it (only an outdated one), buts inside the squirrel installation folder, e.g. squirrel-sql-3.9.0/doc/quick_start.html
On Windows you can make whole settings directory portable using argument --user-settings-dir "%CD%\settings" in the link to .bat file.
Thus in the Target of your link you will get something like this:
"C:\...\squirrelsql\squirrel-sql.bat" --user-settings-dir "%CD%\settings"

Resources