Class: Imap::Backup::CLI
- Inherits:
-
Thor
- Object
- Thor
- Imap::Backup::CLI
show all
- Includes:
- Helpers
- Defined in:
- lib/imap/backup/cli.rb
Defined Under Namespace
Modules: Helpers
Classes: Backup, Local, Migrate, Mirror, Remote, Restore, Setup, Stats, Utils
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Helpers
#account, #connection, #each_connection, included, #load_config, #options
Class Method Details
.accounts_option ⇒ Object
29
30
31
32
33
34
35
36
|
# File 'lib/imap/backup/cli.rb', line 29
def self.accounts_option
method_option(
"accounts",
type: :string,
desc: "a comma-separated list of accounts (defaults to all configured accounts)",
aliases: ["-a"]
)
end
|
.exit_on_failure? ⇒ Boolean
25
26
27
|
# File 'lib/imap/backup/cli.rb', line 25
def self.exit_on_failure?
true
end
|
Instance Method Details
#migrate(source_email, destination_email) ⇒ Object
107
108
109
110
|
# File 'lib/imap/backup/cli.rb', line 107
def migrate(source_email, destination_email)
Imap::Backup::Logger.setup_logging options
Migrate.new(source_email, destination_email, **options).run
end
|
#mirror(source_email, destination_email) ⇒ Object
147
148
149
150
|
# File 'lib/imap/backup/cli.rb', line 147
def mirror(source_email, destination_email)
Imap::Backup::Logger.setup_logging options
Mirror.new(source_email, destination_email, **options).run
end
|
#restore(email = nil) ⇒ Object