Skip to content

Commit

Permalink
Change export dataset name format
Browse files Browse the repository at this point in the history
  • Loading branch information
ggatward committed Oct 16, 2017
1 parent b76367b commit a105037
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ optional arguments:
./sat_export.py -e DEV -a # Full export of repos defined in the DEV config
Output file format will be:
sat_export_2016-07-29_DEV_00
sat_export_2016-07-29_DEV_01
sat_export_2016-07-20_DEV.sha256
sat_export_20160729-1021_DEV_00
sat_export_20160729-1021_DEV_01
sat_export_20160729-1021_DEV.sha256
```

# sat_import
Expand Down Expand Up @@ -250,10 +250,10 @@ optional arguments:

### Examples
```
./sat_import.py -d 2016-07-29_DEV -n # Import content defined in DEV.yml but do not sync
./sat_import.py -d 2016-07-29_DoV # Extract a DoV export but do not sync it
./sat_import.py -d 20160729-1021_DEV -n # Import content defined in DEV.yml but do not sync
./sat_import.py -d 20160729-1021_DoV # Extract a DoV export but do not sync it
./sat_import.py -o MyOrg -l # Lists the date of the last successful import
./sat_import.py -o AnotherOrg -d 2016-07-29_DEV # Import content for a different org
./sat_import.py -o AnotherOrg -d 20160729-1021_DEV # Import content for a different org
```


Expand Down
8 changes: 4 additions & 4 deletions man/sat_import.8
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ file, but can be overridden with this option.
.BR "-d", " --dataset"
.I "DATASET"
.RS 3
Dataset to import. The dataset name consists of the export date and the export environment that was defined during the
Dataset to import. The dataset name consists of the export date/time and the export environment that was defined during the
.I sat_export
process, for example '2016-12-06_SAT1'
process, for example '20161206-1021_SAT1'
.RE
.PP
.BR "-l", " --last"
Expand Down Expand Up @@ -114,9 +114,9 @@ Check when the last import was performed:
.B "sat_import -l"
.RE

Perform an import using dataset 2016-12-06_SAT1, removing input files when done:
Perform an import using dataset 20161206-1021_SAT1, removing input files when done:
.RS 6
.B "sat_import -d 2016-12-06_SAT1 -r"
.B "sat_import -d 20161206-1021_SAT1 -r"
.RE


Expand Down
2 changes: 1 addition & 1 deletion sat_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ def create_tar(export_dir, name):
Creates a single tar, then splits into DVD size chunks and calculates
sha256sum for each chunk.
"""
today = datetime.datetime.strftime(datetime.datetime.now(), '%Y-%m-%d')
today = datetime.datetime.strftime(datetime.datetime.now(), '%Y%m%d-%H%M')
msg = "Creating TAR files..."
helpers.log_msg(msg, 'INFO')
print msg
Expand Down
4 changes: 2 additions & 2 deletions sat_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
def get_inputfiles(dataset):
"""
Verify the input files exist and are valid.
'dataset' is a date (YYYY-MM-DD_ENV) provided by the user - date is in the filename of the archive
Returned 'basename' is the full export filename (sat6_export_YYYY-MM-DD_ENV)
'dataset' is a date (YYYYMMDD-HHMM_ENV) provided by the user - date is in the filename of the archive
Returned 'basename' is the full export filename (sat6_export_YYYYMMDD-HHMM_ENV)
"""
basename = 'sat6_export_' + dataset
shafile = basename + '.sha256'
Expand Down

0 comments on commit a105037

Please sign in to comment.