FlightAware Discussions

Restoring graphs1090 error on different architecture

I’ve followed instruction on readme previously and sucessfully backed up and restored my graphs however, had a spare pi4 laying around and wanted to move across to it.

I’m running Raspberry Pi o/s 64bit where previously i was on Raspbian.

I’ve run the below before carrying out the backup process

sudo /usr/share/graphs1090/rrd-dump.sh /var/lib/collectd/rrd/localhost

The issue i’m having is when it comes to restoring I get the following error:

$ cd /var/lib/collectd/rrd
$ sudo cp /tmp/rrd.tar /var/lib/collectd/rrd/
$ sudo systemctl stop collectd
$ sudo tar xf rrd.tar
$ sudo systemctl restart collectd graphs1090
Job for collectd.service failed because the control process exited with error code.
See "systemctl status collectd.service" and "journalctl -xe" for details.

From systemctl status collectd.service

collectd[20917]: gzip: /run/collectd/localhost/interface-wlan0/if_errors.rrd.gz already exists; not overwritten
collectd[20917]: gzip: /run/collectd/localhost/interface-wlan0/if_dropped.rrd.gz already exists; not overwritten
collectd[20917]: gzip: /run/collectd/localhost/interface-wlan0/if_packets.rrd.gz already exists; not overwritten
collectd[20917]: gzip: /run/collectd/localhost/interface-eth0/if_octets.rrd.gz already exists; not overwritten
collectd[20917]: gzip: /run/collectd/localhost/interface-eth0/if_errors.rrd.gz already exists; not overwritten
collectd[20917]: gzip: /run/collectd/localhost/interface-eth0/if_dropped.rrd.gz already exists; not overwritten
collectd[20917]: gzip: /run/collectd/localhost/interface-eth0/if_packets.rrd.gz already exists; not overwritten
systemd[1]: collectd.service: Control process exited, code=exited, status=1/FAILURE
systemd[1]: collectd.service: Failed with result ‘exit-code’.
systemd[1]: Failed to start Statistics collection and monitoring daemon.

From journalctl -xe

– The process’ exit code is ‘exited’ and its exit status is 1.
collectd[22294]: gzip: /run/collectd/localhost/disk-mmcblk0/disk_ops.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/disk-mmcblk0/disk_merged.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/disk-mmcblk0/disk_time.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/disk-mmcblk0/disk_io_time.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/disk-mmcblk0/disk_octets.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/system_stats/memory-buffers.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/system_stats/memory-used.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/system_stats/memory-free.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/system_stats/memory-cached.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/table-localhost/gauge-cpu_temp.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/dump1090-localhost/dump1090_aircraft-recent.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/dump1090-localhost/dump1090_tracks-single_message.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/dump1090-localhost/dump1090_gps-recent.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/dump1090-localhost/dump1090_mlat-recent.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/dump1090-localhost/dump1090_cpu-background.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/dump1090-localhost/dump1090_dbfs-NaN.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/dump1090-localhost/dump1090_messages-local_accepted.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/dump1090-localhost/dump1090_range-minimum.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/dump1090-localhost/dump1090_cpu-demod.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/dump1090-localhost/dump1090_messages-remote_accepted.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/dump1090-localhost/dump1090_dbfs-noise.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/dump1090-localhost/dump1090_dbfs-signal.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/dump1090-localhost/dump1090_cpu-reader.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/dump1090-localhost/dump1090_messages-remote_accepted_1.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/dump1090-localhost/dump1090_range-quart3.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/dump1090-localhost/dump1090_dbfs-quart3.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/dump1090-localhost/dump1090_dbfs-peak_signal.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/dump1090-localhost/dump1090_range-median.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/dump1090-localhost/dump1090_dbfs-median.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/dump1090-localhost/dump1090_tracks-all.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/dump1090-localhost/dump1090_messages-strong_signals.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/dump1090-localhost/dump1090_messages-positions.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/dump1090-localhost/dump1090_messages-remote_accepted_0.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/dump1090-localhost/dump1090_messages-local_accepted_1.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/dump1090-localhost/dump1090_messages-local_accepted_0.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/dump1090-localhost/dump1090_range-quart1.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/dump1090-localhost/dump1090_dbfs-quart1.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/dump1090-localhost/dump1090_range-max_range.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/dump1090-localhost/dump1090_dbfs-min_signal.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/dump1090-localhost/dump1090_tisb-recent.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/df-root/df_complex-free.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/df-root/df_complex-used.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/df-root/df_complex-reserved.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/interface-wlan0/if_octets.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/interface-wlan0/if_errors.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/interface-wlan0/if_dropped.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/interface-wlan0/if_packets.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/interface-eth0/if_octets.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/interface-eth0/if_errors.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/interface-eth0/if_dropped.rrd.gz already exists; not overwritten
collectd[22294]: gzip: /run/collectd/localhost/interface-eth0/if_packets.rrd.gz already exists; not overwritten
systemd[1]: collectd.service: Control process exited, code=exited, status=1/FAILURE

Does anyone know how i can fix this or am i all out of luck and have to reset and start afresh?

Let’s check some stuff:

cat /etc/systemd/system/collectd.service

You could try this:

sudo systemctl stop collectd
sudo rm /var/lib/collectd/rrd/localhost -rf
cd /var/lib/collectd/rrd
sudo cp /tmp/rrd.tar /var/lib/collectd/rrd/
sudo tar xf rrd.tar
sudo systemctl restart collectd graphs1090

Yeah i think i see what the issue might be.
Changed the instructions so this should not be an issue in the future.

1 Like

$ cat /etc/systemd/system/collectd.service
[Unit]
Description=Statistics collection and monitoring daemon
After=local-fs.target network.target
Requires=local-fs.target network.target
ConditionPathExists=/etc/collectd/collectd.conf
Documentation=man:collectd(1)
Documentation=man:collectd.conf(5)
Documentation=https://collectd.org

[Service]
SyslogIdentifier=collectd
Type=notify
NotifyAccess=main
RuntimeDirectory=collectd
EnvironmentFile=-/etc/default/collectd
ExecStartPre=/bin/bash /usr/share/graphs1090/readback.sh
ExecStartPre=/usr/sbin/collectd -t
ExecStart=/usr/sbin/collectd
ExecStopPost=/bin/bash /usr/share/graphs1090/writeback.sh
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target

Whats strange is i did try to stop collectd before carrying out the restore process but it didnt not work however following your latest change seems to have done the trick.
Many thanks for your help - much appreciated.

Well find the difference :slight_smile:
In short due to the gzipping that’s going on now to reduce disk writes further (around 10 MB at the end of each day) there were gzipped files and non gzipped files which.
So if the backup are non gz files and the files in that folder are gz files then that leads to issues.