When your archive directory becomes too big, this can get in the way of things like running smos-query
commands quickly, and small periodic backups.
The smos-archive export
command lets you export (pieces of) your archive to an external directory for cold storage.
Example usage:
smos-archive export /path/to/export/dir --last-year --also-delete-originals
smos-archive export --directory DIRECTORY_PATH [[--begin DAY] [--end DAY] | --yesterday | --today | --tomorrow | --last-week | --past-week | --this-week | --coming-week | --next-week | --last-month | --past-month | --this-month | --coming-month | --next-month | --last-year | --past-year | --this-year | --coming-year | --next-year | --all-time] [FILTER] [--also-delete-originals]
--directory The directory to export the archive to
--begin start date (inclusive)
--end end time (inclusive)
--yesterday yesterday
--today today
--tomorrow tomorrow
--last-week last week
--past-week the past week
--this-week this week
--coming-week the coming week
--next-week next week
--last-month last month
--past-month the past month
--this-month this month
--coming-month the coming month
--next-month next month
--last-year last year
--past-year the past year
--this-year this year
--coming-year the coming year
--next-year next year
--all-time all time
FILTER A filter to smos files by
--also-delete-originals Also delete the originals from the archive default: False
SMOS_DIRECTORY DIRECTORY_PATH The directory to export the archive to
The directory to export the archive to
directory:
# or null
<string>
Usage: smos-archive export --directory DIRECTORY_PATH [[--begin DAY] [--end DAY] | --yesterday | --today | --tomorrow | --last-week | --past-week | --this-week | --coming-week | --next-week | --last-month | --past-month | --this-month | --coming-month | --next-month | --last-year | --past-year | --this-year | --coming-year | --next-year | --all-time] [FILTER] [--also-delete-originals]
Export (a portion of) an archive
Available settings:
Show this help text
switch: -h|--help
The directory to export the archive to
option: --directory DIRECTORY_PATH
env: SMOS_DIRECTORY DIRECTORY_PATH
config:
directory: # or null
<string>
start date (inclusive)
option: --begin DAY
end time (inclusive)
option: --end DAY
yesterday
switch: --yesterday
today
switch: --today
tomorrow
switch: --tomorrow
last week
switch: --last-week
the past week
switch: --past-week
this week
switch: --this-week
the coming week
switch: --coming-week
next week
switch: --next-week
last month
switch: --last-month
the past month
switch: --past-month
this month
switch: --this-month
the coming month
switch: --coming-month
next month
switch: --next-month
last year
switch: --last-year
the past year
switch: --past-year
this year
switch: --this-year
the coming year
switch: --coming-year
next year
switch: --next-year
all time
switch: --all-time
A filter to smos files by
argument: FILTER
Also delete the originals from the archive
switch: --also-delete-originals
default: False