crontab -e
add
0 0 */10 * * /usr/bin/apt-get update && /usr/bin/apt-get -y dist-upgrade
0 0 */10 * *
: This means the task is scheduled to run at midnight (00:00) every 10th dayof the month. Here's the breakdown:0
: Minute (0th minute, meaning at the start of the hour)0
: Hour (0th hour, meaning midnight)*/10
: Every 10th day of the month (i.e., day 10, 20, 30, etc.)*
: Any month*
: Any day of the week/usr/bin/apt-get update
: This updates the list of available packages and versions from the repositories configured on the system.&&
: This ensures that the next command (apt-get dist-upgrade
) runs only if the apt-get update command is successful./usr/bin/apt-get -y dist-upgrade
: This upgrades all installed packages to the newest available versions. The -y
flag automatically answers "yes" to prompts, so it can run unattended. The dist-upgrade command intelligently handles package dependencies and may install or remove packages as needed to complete the upgrade.apt-get upgrade
this will break your Proxmox VE Host!hi yes i already saw that post, but the question is reccomended to do upgrade automatic, at the moment i do manual update, but when you have 20-30 proxmox instance to upgrade it takes time
That is a question only you can answer YMMV.hi yes i already saw that post, but the question is reccomended to do upgrade automatic, at the moment i do manual update, but when you have 20-30 proxmox instance to upgrade it takes time
Unattended-Upgrade::InstallOnShutdown "true";
Mar 24 21:04:45 pve-biosboot systemd[1]: Stopped getty@tty1.service - Getty on tty1.
Mar 24 21:04:45 pve-test systemd[1]: getty@tty1.service: Deactivated successfully.
Mar 24 21:04:45 pve-test stemd[1]: unattended-upgrades.service: Consumed 30.332s CPU time.
Mar 24 21:04:45 pve-test systemd[1]: Stopped unattended-upgrades.service - Unattended Upgrades Shutdown.
Mar 24 21:04:45 pve-test systemd[1]: unattended-upgrades.service: Unit process 1197 (unattended-upgr) remains running after unit stopped.
Mar 24 21:04:45 pve-test systemd[1]: unattended-upgrades.service: Unit process 1051 (unattended-upgr) remains running after unit stopped.
Mar 24 21:04:45 pve-test systemd[1]: unattended-upgrades.service: Failed with result 'exit-code'.
Mar 24 21:04:45 pve-test systemd[1]: unattended-upgrades.service: Main process exited, code=exited, status=1/FAILURE
Mar 24 21:04:45 pve-test systemd[1]: Stopped lxc-monitord.service - LXC Container Monitoring Daemon.
Mar 24 21:04:45 pve-test systemd[1]: lxc-monitord.service: Deactivated successfully.
Mar 24 21:04:45 pve-test systemd[1]: Stopped zfs-zed.service - ZFS Event Daemon (zed).
-y doesnt answer all upgrade dialogs./usr/bin/apt-get -y dist-upgrade
I forgot about this:-y doesnt answer all upgrade dialogs.
export DEBIAN_FRONTEND=noninteractive TZ=<TIMEZONE>
apt-get -y dist-upgrade
We use essential cookies to make this site work, and optional cookies to enhance your experience.