Current File : //scripts/remote_log_transfer
#!/usr/local/cpanel/3rdparty/bin/perl
# cpanel - scripts/remote_log_transfer             Copyright 2022 cPanel, L.L.C.
#                                                           All rights reserved.
# copyright@cpanel.net                                         http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited

package scripts::remote_log_transfer;

=head1 NAME

This script is used to copy all the main system logs from a server to a backup destination
configured in WHM.
For verbose help and examples, call this script with the --morehelp argument.

=cut

use strict;
use warnings;

use Cpanel::Logger        ();
use Cpanel::Config::Users ();

use parent qw( Cpanel::HelpfulScript );

################################################################################

use constant _OPTIONS => qw( action=s destid=s local_dir=s remote_dir=s keep debug morehelp );

__PACKAGE__->new(@ARGV)->run() unless caller();

################################################################################
# Much of this is a modification of scripts/cpbackup_transport_file
################################################################################

sub run {
    my ($self) = @_;

    if ( $self->getopt('morehelp') ) {
        show_usage();
        return;
    }

    $self->ensure_root();

    my @transport_ids = split( /,/, $self->getopt('destid') ) if defined( $self->getopt('destid') );
    my $command       = $self->getopt('action');
    my $keep_local    = $self->getopt('keep')       || 0;
    my $local_dir     = $self->getopt('local_dir')  || '/backup/';
    my $remote_dir    = $self->getopt('remote_dir') || 'log_backups';

    if ( !defined $command || !$command ) {
        show_usage();
        return;
    }
    if ( $command eq 'list' ) {
        my $all_files_and_directories_ar = get_all_log_paths();
        foreach my $path ( @{$all_files_and_directories_ar} ) {
            print "$path\n";
        }
    }
    elsif ( $command eq 'transfer' ) {

        $Cpanel::Debug::level = 9999 if ( $self->getopt('debug') );

        if ( !@transport_ids ) {
            print STDERR "\n!!!!! Missing argument “--destid=\$destination_id”\n\n";
            show_usage();
            return;
        }

        # Validate the transport_id(s)
        require Cpanel::Backup::Transport;
        require Cpanel::Backup::Utility;

        my $transports             = Cpanel::Backup::Transport->new();
        my $transport_configs      = $transports->get_enabled_destinations();
        my $transport_config_cnt   = @transport_ids;
        my $one_transport_was_good = 0;
        foreach my $transport_id (@transport_ids) {
            my $matching_cfg = $transport_configs->{$transport_id};
            if ( !$matching_cfg ) {
                print "\nNo backup transports exist or are enabled that match the supplied transport “$transport_id” , skipping..\n";
            }
            else {
                $one_transport_was_good++;
            }
        }
        if ( !$one_transport_was_good ) {
            show_usage();
            return;
        }

        my $log_tarball_path = $self->get_log_backup_path($local_dir);

        print "Creating log backup file $log_tarball_path\n";

        require Cpanel::Backup::Config;
        my %conf    = %{ Cpanel::Backup::Config::load() };
        my $utility = Cpanel::Backup::Utility->new( \%conf );

        my $all_log_paths_ar = get_all_log_paths();

        # Create this file without world-readable permissions
        my $orig_umask = umask(0077);

        # We create a bzip2'd tarball to maximize space savings of mostly text log files
        if ( $utility->cpusystem( 'tar', 'cfpj', $log_tarball_path, @{$all_log_paths_ar} ) == 0 ) {
            chmod( 0600, $log_tarball_path );
        }
        else {
            print STDERR "Failed to create $log_tarball_path : $!\n";
            return;
        }
        umask($orig_umask);

        # keep_local has to be overridden here until the last transport, otherwise it will delete the log backup file after the first transport
        # is done.
        my $transport_cnt     = @transport_ids;
        my $current_transport = 0;
        my $final_keeplocal   = $keep_local;

        foreach my $transport_id (@transport_ids) {
            $current_transport++;
            print "Attempting transport of '$log_tarball_path' using transport ID '$transport_id''.\n";

            # Note, the 'Cpanel::Backup::Queue::transport_backup' package/namespace is also defined by this package, so thus it is imported.
            require Cpanel::Backup::Queue;    # PPI USE OK -- Cpanel::Backup::Queue::transport_backup is defined there
            require File::Basename;

            # Even if keep local is false, but we have more transports, toggle it to true
            if ( $current_transport < $transport_cnt ) {
                $keep_local = 1;
            }
            else {
                $keep_local = $final_keeplocal;
            }

            my $args = {
                local_path  => $log_tarball_path,
                remote_path => $remote_dir . '/' . File::Basename::basename($log_tarball_path),
                local_files => $log_tarball_path,
                keep_local  => $keep_local,                                                       # This has no affect here, but we pass it nonetheless and action the logic a little further down
                session_id  => 'LOG_TRANSFER',
                type        => 'compressed',
                cmd         => 'log_transfer',
                transport   => $transport_id,
            };

            my $logger = Cpanel::Logger->new( { 'use_no_files' => 1 } );
            Cpanel::Backup::Queue::transport_backup->new()->process_task( $args, $logger );    # PPI NO PARSE -- See comment below
                                                                                               # The import of Cpanel::Backup::Queue above via require causes the
                                                                                               # namespace in question here to exist, as it is the kind of package
                                                                                               # which defines multiple packages in one file, as perl allows you to
                                                                                               # do. As this is the "common" design of TaskProcessor modules,
                                                                                               # this is not only expected but appropriate.
        }
        unlink $log_tarball_path if !$keep_local;

    }
    else {
        show_usage();
        return;
    }

    return;
}

################################################################################
# how thing do ?
sub show_usage {
    my $log_file_paths_ar = get_all_log_paths();

    print <<EOU;
    Usage:
        $0 --action=<cmd> <args>
        
        Commands:
          list              - Lists all log paths that will be transferred
          transfer          - Transfer logs to remote server
                              Arguments:
                                 --destid=<DestinationID>
                                        The <DestinationID> can be found in WHM on the Backup Configuration -> Additional Destinations page.
                                        The argument here can support multiple destinations, comma delimited, i.e. --destid=OQosRCmRnTNcLcCojd7C0vhC,TAMdl6LZCxQELuUAVO20SjQm
                                        will upload the log backup to both OQosRCmRnTNcLcCojd7C0vhC and TAMdl6LZCxQELuUAVO20SjQm destinations
                                 --local_dir=/backup
                                        The local directory where the compress log files tarball will be stored before transfering to the remote destinations.
                                        Note that this assumes the local directory given is already mounted.
                                        Defaults to “/backup/”
                                 --remote_dir=remote_path/
                                        The path used to store the log file backup on the remote server, relative or absolute based on transfer destination requirements
                                        Defaults to “log_backups”
                                 --debug
                                        Show verbose debug output
                                 --keep
                                        Keep the local log file backup after transfer to the remote destination(s).
          
    Example usages:
    
        # List all log file locations. Additional custom paths can be added to /var/cpanel/config/extra_remote_transfer_paths.txt
        $0 --action=list
        
        # Transfer all logs to the remote backup destination whose ID is TAMdl6LZCxQELuUAVO20SjQm
        $0 --action=transfer --destid=TAMdl6LZCxQELuUAVO20SjQm
        
        # Same as above, but store the logs in the remote directory “backups/logs/Atlanta/” rather than “log_backups/” , while also keeping the local backup in /mnt/backup2/
        $0 --action=transfer --destid=TAMdl6LZCxQELuUAVO20SjQm --remote_dir=backups/logs/Atlanta/ --local_dir=/mnt/backups2/ --keep
        
        
    Log files:
        Custom file paths can be configured by adding them to /var/cpanel/config/extra_remote_transfer_paths.txt , one line for each path.
        Be careful if adding paths here as no validation is done.
        
EOU
    print "\t\tCurrently configured paths:\n\n";
    foreach my $path ( @{$log_file_paths_ar} ) {
        print "\t\t-\t$path\n";
    }
    print "\n";
    return;
}

################################################################################
# We might want to add this to Cpanel/Backup/SystemResources.pm at some point, but this script also should be as independant as possible

sub get_all_log_paths {
    my @paths = (
        "/var/log/",
        "/usr/local/cpanel/logs/",
        "/var/cpanel/logs/",
        "/var/cpanel/updatelogs/",
    );

    require Cpanel::PwCache;
    foreach my $user ( Cpanel::Config::Users::getcpusers() ) {
        my $homedir = Cpanel::PwCache::gethomedir($user);
        push @paths, "$homedir/logs/";
    }

    if ( open( my $custom_extra_fh, '<', '/var/cpanel/config/extra_remote_transfer_paths.txt' ) ) {
        while (<$custom_extra_fh>) {
            chomp;
            my $c_path = $_;
            if ( $c_path !~ m/^\// ) {
                print STDERR "Custom path “$c_path” must be absolute ( start with / ), ignoring\n";
            }
            else {
                if ( -f $c_path || -d _ ) {
                    push( @paths, $c_path );
                }
                else {
                    print STDERR "Custom path “$c_path” is not a file or directory, ignoring.\n";
                }
            }
        }
        close($custom_extra_fh);
    }
    return \@paths;
}

################################################################################
# broken out for easier testing
sub get_log_backup_path {
    my ( $self, $local_dir ) = @_;

    # Create log file backup from all paths in get_all_log_paths() with a base directory
    require Cpanel::Hostname;
    my $hostname = Cpanel::Hostname::gethostname();

    my ( $sec, $min, $hour, $mday, $mon, $year, undef, undef, undef ) = localtime();
    my $formatted_date = sprintf( "%04d-%02d-%02d_%02d-%02d-%02d", $year + 1900, $mon, $mday, $hour, $min, $sec );

    my $log_tarball_path = $local_dir . '/log_backup_' . $hostname . '_' . $formatted_date . '.tar.bz2';
    return $local_dir . '/log_backup_' . $hostname . '_' . $formatted_date . '.tar.bz2';
}
################################################################################

1;
Porn Search engines See Free Pornography Movies & Pornstars

Porn Search engines See Free Pornography Movies & Pornstars

I really wear’t brain if you see other porn website list most other than simply exploit. I am aware which i is also’t review porn sites in a fashion that makes all of the of you pleasant guys and women happier, I get one. However, please do not use ThePornDude.

Finest Web sites Than simply ThePornDude – tainster porn

” It’s the newest locker room of the web sites, without any jockstrap smelling. Following truth be told there’s the picture and you will Movies Revealing areas—holy shag, it’s such as a buffet away from boner energy. Straight, homosexual, bi, any kind of gets the motor revving, it’s the indeed there, categorized so you wear’t occur to stumble on the certain furry guy’s ass unless you to definitely’s the jam.

This is simply not the articles!

Otherwise scrolled previous kinky ways on the DeviantArt and you can knew your’re also taking hard over hands-taken thighs? Just Jenny doing what Jenny wants, along with you slipping to your a premium take a look at to own $9.99/few days. And you can suddenly, naughty bros initiate appreciating something it familiar with forget about—emotion, realism, bulbs one to’s indeed out of a room rather than a studio.

But it addittionally has lots of niched and you will styled lists to have web site recommendations on particular kinks and aspirations. Porn Dude along with comes with suggestions for advanced amateur web sites, but we don’t suggest they. However highly recommend one totally free video clips tubing to his members, even when it’s safer or not or if perhaps he’s filled up with annoying adverts. And then he lays to people in the free gender shows for the camming networks, just in order that he would allow you to join.

tainster porn

And don’t forget, VR is approximately dream visiting life. Are you currently most going to assist weak-butt websites tainster porn cheating you out of the sense your deserve? None of my personal subscribers be satisfied with very first whenever full-to the debauchery is on the newest desk. These are mods, they’re also volunteers, maybe not some corporate prudes, so they have it—they’re also merely there to quit the real sickos. There’s as well as that it profile program, that is clutch. You rate the favorable crap, plus it floats to reach the top including cum within the a sexy tub.

They encrypt important computer data so your boss doesn’t learn you’re also to your feet otherwise almost any. Representative information remains locked down, and your uploads is your own—nobody’s promoting their selfmade sex recording in order to sketchy advertisement enterprises. The site’s hardcore on the keeping away unlawful crap too—for those who’re also dumb adequate to article kiddie porno, they’ll nuke your account and probably your heart. To join the fresh group, you need a free account. Signing up is a lot easier than taking laid during the an excellent frat home—just an email and you will an excellent username, therefore’re also within the. Modify their profile with bullshit concerning your favourite position, therefore’lso are happy to move.

However,, I will’t attest to actually all other sites I comment, while the everything is at the mercy of changes. Merely rating an antivirus and wear’t download one executable files, please. At the same time, of a lot low-conventional classes get information out of Porno Guy. If you would like Hentai, the site will get particular premium and you will free hentai online streaming hyperlinks. Sit sexy, continue exploring, rather than forget—the largest sex body organ is your notice. Lubricant one to thing up with imagination, and also you’re also ready to go.

Budget-Amicable VR Earphones One to Nevertheless Stop Butt

tainster porn

The newest website has clear categories, ranked listing, and you may small descriptions to help you discover what you’lso are searching for rather than scrolling as a result of unlimited text. The countless categories on the site will certainly feature at the least a couple of kinks you could appreciate. Although not, some of these groups ability of many links so you can lifeless sites. In the February 2016, blogger Bill Quick, creating for the amusement reports web site Egotastic, classified ThePornDude aggregator as the a good «cornucopia» out of mature sites3. Here’s the hard facts—pun extremely intended—you won’t perish instead of pornography.

Doing it yourself Articles & the rise of Amateur Systems

For many who’re not paying for it, you’ll have to put up with certain ads. However, one doesn’t indicate you have to put up with pop-ups very unpleasant that they can create your tough dick softer if you are seeking to intimate them. Concurrently, some hoses is also steal yours study. With regards to gay websites, it’s clear which he doesn’t comprehend the kink and simply writes anything they can imagine out of. Also it’s the same to your comic strip intercourse 100 percent free sites.

  • I’m able to always direct you for the most popular the new gadgets, enjoy, and brain-blowing technology just before anyone else.
  • ” It’s the brand new locker room of the sites, with no jockstrap smell.
  • It’s hot, intimate, and you may truth be told brainy.
  • At the end of a single day, you’re also perhaps not making the porn web site on the attention out of benefits – you’re also providing in order to 18-year-old virgins making use of their dick within hands.
  • The fresh listings are up coming filtered out so that precisely the best of talking about assessed and you may delivered to your own attention on the this site.

As well as the of-matter point is going to be a great snooze unless of course someone initiate a bond on the fucking aliens. But one to’s quick carrots if the others is this a. The brand new superior speed you are going to chafe certain cheapskates, but when you’re also seriously interested in your own porno games, it’s a tiny rates to pay for unlimited smut. You’ve got your current Dialogue, where males bullshit from the many techniques from its newest conquests so you can “hey, my personal dick’s itchy, what’s up?

  • Just after you to definitely’s moved, the pressure compares.
  • Will you be really likely to assist weakened-ass other sites cheat your outside of the sense your need?
  • But it addittionally is loaded with niched and you may themed lists to possess website tips about particular kinks and you can dreams.
  • Another pornography falls off the face of your internet sites, you understand just how strong the fresh desire most works.

tainster porn

They’re all seeking be loved ones-amicable which have complimentary sweaters and you will sexless grins. Instagram bans one hint away from breast. TikTok deletes is the reason the newest tip of lust. They blacklist NSFW programs such they’lso are radioactive. Specific governing bodies behave like pornography are atomic spend. Asia have prohibited and you may unbanned 800+ internet sites more moments than just We’ve changed socks.


Publicado

en

por

Etiquetas: