App-WHMCSUtils
view release on metacpan or search on metacpan
script/restore-whmcs-client view on Meta::CPAN
#!perl
# Note: This script is a CLI for Riap function /App/WHMCSUtils/restore_whmcs_client
# and generated automatically using Perinci::CmdLine::Gen version 0.500
use 5.010001;
use strict;
use warnings;
use Log::ger;
use Perinci::CmdLine::Any;
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2021-11-30'; # DATE
our $DIST = 'App-WHMCSUtils'; # DIST
our $VERSION = '0.012'; # VERSION
my $cmdline = Perinci::CmdLine::Any->new(
url => "/App/WHMCSUtils/restore_whmcs_client",
program_name => "restore-whmcs-client",
log => 1,
);
$cmdline->run;
# ABSTRACT: Restore a missing client from SQL database backup
# PODNAME: restore-whmcs-client
__END__
=pod
=encoding UTF-8
=head1 NAME
restore-whmcs-client - Restore a missing client from SQL database backup
=head1 VERSION
This document describes version 0.012 of restore-whmcs-client (from Perl distribution App-WHMCSUtils), released on 2021-11-30.
=head1 SYNOPSIS
Usage:
% B<restore-whmcs-client> [B<--client-email>=I<str>] [B<--client-id>=I<posint>] [B<--config-path>=I<path>|B<-c>|B<--no-config>|B<-C>] [B<--config-profile>=I<profile>|B<-P>] [B<--debug>|B<--log-level>=I<level>|B<--quiet>|B<--trace>|B<--verbose>] [B<--...
=head1 OPTIONS
C<*> marks required options.
=head2 Main options
=over
=item B<--client-email>=I<s>
=item B<--client-id>=I<s>
=item B<--no-restore-domains>
=item B<--no-restore-hostings>
=item B<--no-restore-invoices>
=item B<--sql-backup-dir>=I<s>
Directory containing per-table SQL files.
=item B<--sql-backup-file>=I<s>
Can accept either `.sql` or `.sql.gz`.
Will be converted first to a directory where the SQL file will be extracted to
separate files on a per-table basis.
=back
=head2 Configuration options
=over
=item B<--config-path>=I<s>, B<-c>
Set path to configuration file.
=item B<--config-profile>=I<s>, B<-P>
Set configuration profile to use.
=item B<--no-config>, B<-C>
Do not use any configuration file.
=back
=head2 Environment options
=over
=item B<--no-env>
Do not read environment for default options.
=back
=head2 Logging options
=over
=item B<--debug>
Shortcut for --log-level=debug.
=item B<--log-level>=I<s>
Set log level.
=item B<--quiet>
Shortcut for --log-level=error.
=item B<--trace>
Shortcut for --log-level=trace.
=item B<--verbose>
Shortcut for --log-level=info.
script/restore-whmcs-client view on Meta::CPAN
It is recommended, however, that you install modules using L<cpanm-shcompgen>
which can activate shell completion for scripts immediately.
=head2 tcsh
To activate tcsh completion for this script, put:
complete restore-whmcs-client 'p/*/`restore-whmcs-client`/'
in your tcsh startup (e.g. F<~/.tcshrc>). Your next shell session will then
recognize tab completion for the command. Or, you can also directly execute the
line above in your shell to activate immediately.
It is also recommended to install L<shcompgen> (see above).
=head2 other shells
For fish and zsh, install L<shcompgen> as described above.
=head1 CONFIGURATION FILE
This script can read configuration files. Configuration files are in the format of L<IOD>, which is basically INI with some extra features.
By default, these names are searched for configuration filenames (can be changed using C<--config-path>): F<~/.config/restore-whmcs-client.conf>, F<~/restore-whmcs-client.conf>, or F</etc/restore-whmcs-client.conf>.
All found files will be read and merged.
To disable searching for configuration files, pass C<--no-config>.
You can put multiple profiles in a single file by using section names like C<[profile=SOMENAME]> or C<[SOMESECTION profile=SOMENAME]>. Those sections will only be read if you specify the matching C<--config-profile SOMENAME>.
You can also put configuration for multiple programs inside a single file, and use filter C<program=NAME> in section names, e.g. C<[program=NAME ...]> or C<[SOMESECTION program=NAME]>. The section will then only be used when the reading program match...
You can also filter a section by environment variable using the filter C<env=CONDITION> in section names. For example if you only want a section to be read if a certain environment variable is true: C<[env=SOMEVAR ...]> or C<[SOMESECTION env=SOMEVAR ...
To load and configure plugins, you can use either the C<-plugins> parameter (e.g. C<< -plugins=DumpArgs >> or C<< -plugins=DumpArgs@before_validate_args >>), or use the C<[plugin=NAME ...]> sections, for example:
[plugin=DumpArgs]
-event=before_validate_args
-prio=99
[plugin=Foo]
-event=after_validate_args
arg1=val1
arg2=val2
which is equivalent to setting C<< -plugins=-DumpArgs@before_validate_args@99,-Foo@after_validate_args,arg1,val1,arg2,val2 >>.
List of available configuration parameters:
client_email (see --client-email)
client_id (see --client-id)
format (see --format)
log_level (see --log-level)
naked_res (see --naked-res)
restore_domains (see --no-restore-domains)
restore_hostings (see --no-restore-hostings)
restore_invoices (see --no-restore-invoices)
sql_backup_dir (see --sql-backup-dir)
sql_backup_file (see --sql-backup-file)
=head1 ENVIRONMENT
=head2 RESTORE_WHMCS_CLIENT_OPT => str
Specify additional command-line options.
=head1 FILES
F<~/.config/restore-whmcs-client.conf>
F<~/restore-whmcs-client.conf>
F</etc/restore-whmcs-client.conf>
=head1 HOMEPAGE
Please visit the project's homepage at L<https://metacpan.org/release/App-WHMCSUtils>.
=head1 SOURCE
Source repository is at L<https://github.com/perlancar/perl-App-WHMCSUtils>.
=head1 AUTHOR
perlancar <perlancar@cpan.org>
=head1 CONTRIBUTING
To contribute, you can send patches by email/via RT, or send pull requests on
GitHub.
Most of the time, you don't need to build the distribution yourself. You can
simply modify the code, then test via:
% prove -l
If you want to build the distribution (e.g. to try to install it locally on your
system), you can install L<Dist::Zilla>,
L<Dist::Zilla::PluginBundle::Author::PERLANCAR>, and sometimes one or two other
Dist::Zilla plugin and/or Pod::Weaver::Plugin. Any additional steps required
beyond that are considered a bug and can be reported to me.
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2021, 2019, 2018, 2017 by perlancar <perlancar@cpan.org>.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=head1 BUGS
Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=App-WHMCSUtils>
When submitting a bug or request, please include a test-file or a
patch to an existing test-file that illustrates the bug or desired
feature.
=cut
( run in 0.953 second using v1.01-cache-2.11-cpan-39bf76dae61 )