Porovnávané verzie

Kľúč

  • Tento riadok sa pridal
  • Riadok je odstránený.
  • Formátovanie sa zmenilo.


Poznámka

Manažment D2000 archívov je nutné vykonávať ako užívateľ root

...

Management of D2000 archives must be performed as a user root

The script <instancedir>/bin/d2arc <command> [<appname> [<arcname>]]

...

is used to manage the D2000 application archives

<appname> is the name of the application, if not specified, the script will ask for the application name.

<arcname> is the name of the archive, if not specified, the script will ask for the archive name.

<command>is one of the options:

create

creates an archive database to the archive

<appname> je meno aplikácie, ak nie je zadané, skript sa na meno aplikácie opýta.

<arcname> je meno archívu, ak nie je zadané, skript sa na meno archívu opýta.

<command> je jedna z možností:

create

vytvorí archívnu databázu k archívu <arcname>

Blok kódu
languagetext
themeEmacs
[root@localhost bin]# ./d2arc create app1 arc1
=======================
Ready to create D2000 archive:
           Application name: app1
               Archive name: arc1
            psql executable: /usr/pgsql-9.6/bin/psql
--
        D2000 instance name: d2000
     D2000 installation dir: /opt/d2000
=======================

Proceed (yY|nN)? [y]: y
Creating archive database...done
Archive database arc1 created.

V prípade, že vytvárate archív pre aplikáciu, ktorá beží na inom počítači ako In case you are creating an archive for an application that runs on a computer other than the D2000 kernel (ti.j. vzdialený archív), zadajte meno vzdialenej aplikácie. Skript zistí, že aplikácia na lokálnom počítači neexistuje, takže ponúkne jej vytvorenie a naviac vytvorí aj systemd službu, ktorá bude archívny proces štartovaťe., a remote archive), enter the name of the remote application. The script detects that the application does not exist on the local computer, so it offers to create it and also creates a systemd service that will start the archive process.


Blok kódu
languagetext
themeEmacs
[root@localhost bin]# ./d2arc create remoteApp arc1
Application remoteApp does not exist. Create remote application (yY|nN)? [y]: y
=======================
Ready to create D2000 archive:
           Application name: remoteApp
               Archive name: arc1
            psql executable: /usr/pgsql-9.6/bin/psql
--
        D2000 instance name: d2000
     D2000 installation dir: /opt/d2000
=======================

Proceed (yY|nN)? [y]: y
Creating archive database...done
Archive database arc1 created.

Enter D2000 process command line: archiv /CremoteApp /Warc1
systemd service "d2000-remoteApp-arc1.arc.service" for process "arc1.arc" was created.


delete

zmaže archívnu databázu k archívu deletes the archive database to the archive <arcname>

Blok kódu
languagetext
themeEmacs
[root@localhost bin]# ./d2arc delete app1 arc1
=======================
Ready to delete D2000 archive:
           Application name: app1
               Archive name: arc1
            psql executable: /usr/pgsql-9.6/bin/psql
--
        D2000 instance name: d2000
     D2000 installation dir: /opt/d2000
=======================

Proceed (yY|nN)? [n]: y
Archive "arc1" was deleted.

export-data

exportuje archívu databázu do súboruexports the archive database to a file

Blok kódu
languagetext
themeEmacs
[root@localhost bin]# ./d2arc export-data app1 arc1
Enter dump file name [app1_arc1.archive_dmp]:
Enter password for postgresql user dba:
Password:
Export to app1_arc1.archive_dmp finished.import-data

import-data

importuje archívu databázu zo súboruimports the archive database from the file 

Blok kódu
languagetext
themeEmacs
[root@localhost bin]# ./d2arc import-data app1 arc1
Enter dump file name [app1_arc1.archive_dmp]:
Enter password for postgresql user dba:
Import from app1_arc1.archive_dmp finished.

...