Initial switch to h2 database instead of csv
All checks were successful
Locusworks Team/aws-s3-sync/pipeline/head This commit looks good

This commit is contained in:
2020-11-27 23:27:48 -06:00
parent 6d6f0ed891
commit 6d908b43d7
20 changed files with 887 additions and 312 deletions

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
<persistence-unit name="s3sync_pu" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<class>net.locusworks.s3sync.database.entities.FileInfo</class>
<properties/>
</persistence-unit>
</persistence>

View File

@@ -0,0 +1,10 @@
CREATE TABLE s3sync.file_info (
ID IDENTITY NOT NULL AUTO_INCREMENT,
FILE_NAME VARCHAR(1000) NOT NULL,
FILE_PATH VARCHAR(1000) NOT NULL,
FILE_HASH VARCHAR(40) NOT NULL,
UPLOAD_DATE TIMESTAMP,
UPLOADED BOOLEAN NOT NULL,
CONSTRAINT FILE_INFO_PK PRIMARY KEY (ID),
CONSTRAINT FILE_INFO_UN UNIQUE (FILE_HASH)
);

View File

@@ -0,0 +1 @@
CREATE SCHEMA IF NOT EXISTS s3sync AUTHORIZATION sa;

View File

@@ -1,9 +1,11 @@
region=us-east-2
bucketName=locus2k-backup
transferType=remote
remoteFolder=logs
logLevel=INFO
identity=${user.home}/.ssh/id_rsa
host=s3sync.locusworks.net
user=iparenteau
port=22
localFolder=Downloads
localFolder=Downloads
deleteLocalFiles=true