I still don’t exactly understand why in your case /usr/bin/systemctl is missing (on all my systems, /bin is just a symlink to /usr/bin so wherever the package installs it, it’s found in both).
Anyways. this is good enough for now.
Try taking a backup, does it work?
I upgrade from 18.04 to 20.04 maybe in 20.04 (if you install it from scratch) must have the semilink! Im not sure but maybe this is a reason… on my production system which was 18.04 after upgrade to 20.04 it has also only in /bin/systemctl thats why I guess its because of that…
so its right what I guess, on other machine its 22.04 its under /usr/bin/systemctl and /bin/systemctl as you said.
The backup works like a charm, thank you so much @evgeni , I can also restore with foreman-maintain right ?
root@test-dev:~# foreman-maintain backup offline /tmp/backup/
Starting backup: 2023-03-16 09:51:38 +0100
Running preparation steps required to run the next scenarios
================================================================================
Make sure Foreman DB is up:
- Checking connection to the Foreman DB [OK]
--------------------------------------------------------------------------------
Running Backup
================================================================================
Confirm turning off services is allowed:
WARNING: This script will stop your services.
Do you want to proceed?, [y(yes), q(quit)] y
[OK]
--------------------------------------------------------------------------------
Prepare backup Directory:
Creating backup folder /tmp/backup/foreman-backup-2023-03-16-09-51-38 [OK]
--------------------------------------------------------------------------------
Check if the directory exists and is writable: [OK]
--------------------------------------------------------------------------------
Generate metadata:
/ Saving metadata to metadata.yml [OK]
--------------------------------------------------------------------------------
Detect features available in the local proxy: [OK]
--------------------------------------------------------------------------------
Add maintenance_mode tables/chain to nftables/iptables: [OK]
--------------------------------------------------------------------------------
Stop applicable services:
Stopping the following service(s):
postgresql, dynflow-sidekiq@orchestrator, foreman, puppetserver, foreman.socket, dynflow-sidekiq@worker-1, foreman-proxy
\ All services stopped [OK]
--------------------------------------------------------------------------------
Backup config files:
| Collecting config files to backup [OK]
--------------------------------------------------------------------------------
Backup Foreman DB offline:
\ Collecting data from /var/lib/postgresql/10/main/,/var/lib/postgresql/12/main/
[OK]
--------------------------------------------------------------------------------
Start applicable services:
Starting the following service(s):
postgresql, dynflow-sidekiq@orchestrator, foreman, puppetserver, dynflow-sidekiq@worker-1, foreman-proxy
- All services started [OK]
--------------------------------------------------------------------------------
Remove maintenance mode table/chain from nftables/iptables: [OK]
--------------------------------------------------------------------------------
Compress backup data to save space:
/ Compressing backup of Postgres DB [OK]
--------------------------------------------------------------------------------
Done with backup: 2023-03-16 09:53:43 +0100
**** BACKUP Complete, contents can be found in: /tmp/backup/foreman-backup-2023-03-16-09-51-38 ****
Yes its exists on 20.04 and I tested on 22.04 also:
On Ubuntu 20.04 :
# ls /run/systemd/system/
netplan-ovs-cleanup.service systemd-networkd.service.wants
On Ubuntu 22.04:
# ls /run/systemd/system/
netplan-ovs-cleanup.service systemd-networkd.service.wants
Its okay when I run foreman-maintain service status that the status of each services e.g. Active: active (running) gray and not active (running) is in green ? because now I have to look at each one if its running or not
Right now, 1.2.4 is the last version available in the repos and 1.2.7 “staged” for release (= will be released the next time someone clicks the “release 3.5” button)
Once we merge the systemd detection fix above, I intent to release a 1.2.8 and would think that then we actually will go and promote that to the repos.
I wouldn’t want to promise any dates, but I guess a week or so is a reasonable timeframe
foreman-maintain 1.2.8 contains the fixes we identified in this thread.
it’s been available for nightly and foreman 3.6 already
3.5 will follow whenever the next 3.5.z happens