Restoring the user DB (Mojo branch): Difference between revisions

From DXSpider Documentation Wiki
Jump to navigation Jump to search
DXSpider Documentation>EA3CV
Created page with "From the command line as <b>sysop</b> user: Stopped service <pre> sudo service dxspider stop </pre> Change to the directory that contains the user backup: <b>user_json</b> <pre> cd /spider/local_data </pre> Run regeneration of <b>users.v3j</b> <pre> perl user_json </pre> Start cluster service <pre> sudo service dxspider start </pre>"
 
WI3W (talk | contribs)
m Expand on usage and procedure
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
From the command line as <b>sysop</b> user:
From the linux command line as the <b>login</b> user. Note: the sysop user should under no circumstance have sudo privileges.


Stopped service
Stop the service:
<pre>
<pre>
  sudo service dxspider stop
  sudo service dxspider stop
</pre>
</pre>
Change to the directory that contains the user backup: <b>user_json</b>
From the command line as <b>sysop</b> user:
<pre>
Change to the directory that contains the user backup: <b>user_json</b><pre>
  cd /spider/local_data
  cd /spider/local_data
</pre>
</pre>
Line 17: Line 17:
sudo service dxspider start
sudo service dxspider start
</pre>
</pre>
== Back-up or Transfer User DB ==
To backup and/or transfer the user database we will use the 'export_json' command in the sysop console. From the software 'help export_json':
EXPORT_USERS [<filename>] Export the users database to ascii
  Export the users database to a file in ascii format. If no filename
  is given then it will export the file to /spider/data/user_asc.
  If the file already exists it will be renamed to <filename>.o. In fact
  up to 5 generations of the file can be kept each one with an extra 'o' on the
  suffix.
  BE WARNED: this will write to any file you have write access to. No check is
  made on the filename (if any) that you specify.
On the origin node, in the sysop console:
export_json /tmp/example_json - (this creates the file /tmp/example_json)
As the sysop user (or a user with suitable privilege) at the linux prompt, the backup can be moved to a backup directory or transferred to external media:
cp /tmp/example_json /home/sysop/backup/ - (this is only an example, your case may be different)
At this point you now have a backup of the user database.
To transfer the user database to a new node...
On the new node, at the linux prompt as the login user (again sysop should under no circumstances have sudo privilege):
sudo service dxspider stop
Copy the user_json from above to /spider/local_data/user_json:
cp /<nowiki><source dir name>/user_json /spider/local_data/user_json</nowiki>
Then we need to tell the node there is a new user database:
/spider/perl/update_sysop.pl
Now start the DXSpider service:
sudo service dxspider start
Verify that the new user database loaded with information specific to your node. i.e registered users
At the sysop console:
show/registered

Latest revision as of 00:29, 8 April 2025

From the linux command line as the login user. Note: the sysop user should under no circumstance have sudo privileges.

Stop the service:

 sudo service dxspider stop

From the command line as sysop user:

Change to the directory that contains the user backup: user_json

 cd /spider/local_data

Run regeneration of users.v3j

perl user_json

Start cluster service

sudo service dxspider start

Back-up or Transfer User DB

To backup and/or transfer the user database we will use the 'export_json' command in the sysop console. From the software 'help export_json':

EXPORT_USERS [<filename>] Export the users database to ascii
 Export the users database to a file in ascii format. If no filename
 is given then it will export the file to /spider/data/user_asc.

 If the file already exists it will be renamed to <filename>.o. In fact
 up to 5 generations of the file can be kept each one with an extra 'o' on the
 suffix.

 BE WARNED: this will write to any file you have write access to. No check is
 made on the filename (if any) that you specify.

On the origin node, in the sysop console:

export_json /tmp/example_json - (this creates the file /tmp/example_json)

As the sysop user (or a user with suitable privilege) at the linux prompt, the backup can be moved to a backup directory or transferred to external media:

cp /tmp/example_json /home/sysop/backup/ - (this is only an example, your case may be different)

At this point you now have a backup of the user database.

To transfer the user database to a new node...

On the new node, at the linux prompt as the login user (again sysop should under no circumstances have sudo privilege):

sudo service dxspider stop

Copy the user_json from above to /spider/local_data/user_json:

cp /<source dir name>/user_json /spider/local_data/user_json

Then we need to tell the node there is a new user database:

/spider/perl/update_sysop.pl

Now start the DXSpider service:

sudo service dxspider start

Verify that the new user database loaded with information specific to your node. i.e registered users

At the sysop console:

show/registered