About Postgresql Backups

https://www.opsdash.com/blog/postgresql-backup-restore.html

 

TAR CUSTOM DIR SCRIPT
Tempo 4min 7min 2min
Tamanho 3.13GB 1.51GB 3.13GB
Proc 28% 12%
IO W:18MB W:160MB
Advertisements

SchedulerException: Trigger does not reference given job!

You just need to use the trigger.forJob(‘jobA’, ‘group1’) with the correct group that you used on jobDetail.withIdentity(‘jobA’, ‘group1’)

 

JobDetail jobDetail = newJob(JobProtecaoAndaresEquipamento.class)
.withIdentity(JOB_ID, GROUP_PROTECAO_EQUIPAMENTO)
.usingJobData(“codigoEquipamento”, codigoEquipamento)
.build();

//TODO tipo job
Trigger triggerDiario = newTrigger()
.withIdentity(TRIGGER_ID, GROUP_PROTECAO_EQUIPAMENTO)
.startAt(DateUtils.getCurrentTimestamp()) //TODO testes substituir por debaixo
//.startAt(equipamento.getDataInicioProcessoBloqueio())
.withSchedule(simpleSchedule().withIntervalInSeconds(24).repeatForever())//TODO mudar para horas apos testes
.forJob(JOB_ID, GROUP_PROTECAO_EQUIPAMENTO)
.build();

Installing PostgreSQL on Windows using zip archive without the installer

postgresql-logo

 

  1. Download postgresql from https://www.enterprisedb.com/download-postgresql-binaries;
  2. Unzip it;
  3. Open a cmd;
  4. Enter into the ‘bin’ directory;
  5. Init the database:
    1. initdb.exe -D ../data –username=postgres –auth=trust
  6. Start the database:
    1. pg_ctl.exe start -D ../data
  7. Open another cmd;
  8. Enter into the ‘bin’ directory;
  9. Log into the database:
    1. psql –username=postgres
  10. Create a password for your user:
    1. ALTER USER postgres WITH PASSWORD ‘VeryVerySecret’;
  11. Install adminpack extension:
    1. CREATE EXTENSION adminpack;