Skip to content

Instantly share code, notes, and snippets.

# wget https://gist.github.com/ydf/8c5a7f80ee84dd24c5c676f84929b1f8/raw/dda2ab31a16fc5ab436666d2162bd2db85350632/deploy_unattended-upgrades.sh -O /tmp/a && sh /tmp/a
apt-get -y install unattended-upgrades && \
cat > /etc/apt/apt.conf.d/10periodic <<EOF
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "3";
APT::Periodic::Unattended-Upgrade "1";
EOF
sed -i 's#//\t"${distro_id}:${distro_codename}-updates"#\t"${distro_id}:${distro_codename}-updates"#' /etc/apt/apt.conf.d/50unattended-upgrades && \
@ydf
ydf / xtrabackup_full_increment_restore.sh
Last active February 6, 2022 05:52 — forked from SQLadmin/xtrabackup_full_increment_restore.sh
Automate xtrabackup for FULL/Incremental and restore
#!/bin/bash
# This is my production backup script.
# https://sqlgossip.com
set -e
set -u
usage() {
echo "usage: $(basename $0) [option]"
echo "option=full: Perform Full Backup"