Currently translated at 100.0% (40 of 40 strings) Translation: OpenWrt/LuCI/applications/cloudflared Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationscloudflared/es/ Translated using Weblate (Spanish) Currently translated at 21.2% (7 of 33 strings) Translation: OpenWrt/LuCI/applications/v2raya Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsv2raya/es/ Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (19 of 19 strings) Translation: OpenWrt/LuCI/applications/irqbalance Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsirqbalance/zh_Hans/ Translated using Weblate (Lithuanian) Currently translated at 46.3% (38 of 82 strings) Translated using Weblate (Italian) Currently translated at 96.3% (235 of 244 strings) Translation: OpenWrt/LuCI/applications/banip Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsbanip/it/ Translated using Weblate (Spanish) Currently translated at 100.0% (168 of 168 strings) Translation: OpenWrt/LuCI/applications/aria2 Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsaria2/es/ Translated using Weblate (Italian) Currently translated at 100.0% (280 of 280 strings) Translated using Weblate (Lithuanian) Currently translated at 47.1% (91 of 193 strings) Translated using Weblate (Italian) Currently translated at 2.5% (1 of 40 strings) Translation: OpenWrt/LuCI/applications/cloudflared Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationscloudflared/it/ Translated using Weblate (Portuguese) Currently translated at 9.0% (3 of 33 strings) Translation: OpenWrt/LuCI/applications/v2raya Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsv2raya/pt/ Translated using Weblate (Italian) Currently translated at 3.0% (1 of 33 strings) Translation: OpenWrt/LuCI/applications/v2raya Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsv2raya/it/ Translated using Weblate (Portuguese) Currently translated at 4.3% (2 of 46 strings) Translation: OpenWrt/LuCI/applications/xfrpc Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsxfrpc/pt/ Translated using Weblate (Portuguese) Currently translated at 100.0% (19 of 19 strings) Translation: OpenWrt/LuCI/applications/irqbalance Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsirqbalance/pt/ Translated using Weblate (German) Currently translated at 89.4% (17 of 19 strings) Translation: OpenWrt/LuCI/applications/irqbalance Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsirqbalance/de/ Translated using Weblate (Portuguese) Currently translated at 2.0% (4 of 198 strings) Translation: OpenWrt/LuCI/applications/smartdns Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationssmartdns/pt/ Translated using Weblate (Portuguese) Currently translated at 93.9% (31 of 33 strings) Translation: OpenWrt/LuCI/applications/alist Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsalist/pt/ Translated using Weblate (Italian) Currently translated at 3.0% (1 of 33 strings) Translation: OpenWrt/LuCI/applications/alist Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsalist/it/ Translated using Weblate (Italian) Currently translated at 23.6% (44 of 186 strings) Translation: OpenWrt/LuCI/applications/unbound Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsunbound/it/ Translated using Weblate (Italian) Currently translated at 100.0% (40 of 40 strings) Translation: OpenWrt/LuCI/applications/clamav Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsclamav/it/ Translated using Weblate (Italian) Currently translated at 100.0% (168 of 168 strings) Translation: OpenWrt/LuCI/applications/aria2 Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsaria2/it/ Translated using Weblate (Portuguese) Currently translated at 100.0% (51 of 51 strings) Translated using Weblate (German) Currently translated at 100.0% (51 of 51 strings) Translated using Weblate (Italian) Currently translated at 99.8% (2350 of 2353 strings) Translation: OpenWrt/LuCI/modules/luci-base Translate-URL: https://hosted.weblate.org/projects/openwrt/luci/it/ Translated using Weblate (German) Currently translated at 92.3% (2173 of 2353 strings) Translation: OpenWrt/LuCI/modules/luci-base Translate-URL: https://hosted.weblate.org/projects/openwrt/luci/de/ Translated using Weblate (Asturian) Currently translated at 100.0% (3 of 3 strings) Translated using Weblate (Asturian) Currently translated at 95.8% (46 of 48 strings) Translated using Weblate (Asturian) Currently translated at 96.9% (32 of 33 strings) Added translation using Weblate (Asturian) Added translation using Weblate (Asturian) Added translation using Weblate (Asturian) Translated using Weblate (Asturian) Currently translated at 81.8% (27 of 33 strings) Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (40 of 40 strings) Translation: OpenWrt/LuCI/applications/cloudflared Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationscloudflared/zh_Hans/ Translated using Weblate (Spanish) Currently translated at 6.0% (4 of 66 strings) Translation: OpenWrt/LuCI/applications/sshtunnel Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationssshtunnel/es/ Translated using Weblate (Spanish) Currently translated at 100.0% (120 of 120 strings) Translation: OpenWrt/LuCI/applications/usteer Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsusteer/es/ Translated using Weblate (Spanish) Currently translated at 100.0% (48 of 48 strings) Translated using Weblate (Spanish) Currently translated at 100.0% (59 of 59 strings) Translation: OpenWrt/LuCI/applications/nft-qos Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsnft-qos/es/ Translated using Weblate (Spanish) Currently translated at 100.0% (183 of 183 strings) Translated using Weblate (Spanish) Currently translated at 100.0% (14 of 14 strings) Translated using Weblate (Spanish) Currently translated at 96.2% (362 of 376 strings) Translated using Weblate (Spanish) Currently translated at 100.0% (82 of 82 strings) Translated using Weblate (Spanish) Currently translated at 94.5% (2225 of 2353 strings) Translation: OpenWrt/LuCI/modules/luci-base Translate-URL: https://hosted.weblate.org/projects/openwrt/luci/es/ Co-authored-by: Džiugas J <dziugas1959@hotmail.com> Co-authored-by: Enol P <enolp@softastur.org> Co-authored-by: Hosted Weblate <hosted@weblate.org> Co-authored-by: Mc Giver <mcgivergim@gmail.com> Co-authored-by: Random <random-r@users.noreply.hosted.weblate.org> Co-authored-by: gallegonovato <fran-carro@hotmail.es> Co-authored-by: ssantos <ssantos@web.de> Co-authored-by: 大王叫我来巡山 <hamburger2048@users.noreply.hosted.weblate.org> Signed-off-by: "Enol P." <enolp@softastur.org> Signed-off-by: Mc Giver <mcgivergim@gmail.com> Signed-off-by: Random <random-r@users.noreply.hosted.weblate.org> Signed-off-by: gallegonovato <fran-carro@hotmail.es> Signed-off-by: ssantos <ssantos@web.de> Signed-off-by: 大王叫我来巡山 <hamburger2048@users.noreply.hosted.weblate.org> Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationscommands/ast/ Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsfirewall/it/ Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsntpc/es/ Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsolsr/es/ Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsopenvpn/lt/ Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationssplash/es/ Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationssplash/lt/ Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsstatistics/es/ Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsupnp/de/ Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsupnp/pt/ Translate-URL: https://hosted.weblate.org/projects/openwrt/lucimodulesluci-mod-battstatus/ast/ Translate-URL: https://hosted.weblate.org/projects/openwrt/lucimodulesluci-mod-dashboard/ast/ Translate-URL: https://hosted.weblate.org/projects/openwrt/lucimodulesluci-mod-dashboard/es/ Translation: OpenWrt/LuCI/applications/commands Translation: OpenWrt/LuCI/applications/firewall Translation: OpenWrt/LuCI/applications/ntpc Translation: OpenWrt/LuCI/applications/olsr Translation: OpenWrt/LuCI/applications/openvpn Translation: OpenWrt/LuCI/applications/splash Translation: OpenWrt/LuCI/applications/statistics Translation: OpenWrt/LuCI/applications/upnp Translation: OpenWrt/LuCI/modules/luci-mod-battstatus Translation: OpenWrt/LuCI/modules/luci-mod-dashboard |
||
---|---|---|
.. | ||
htdocs/luci-static/resources | ||
po | ||
root | ||
Makefile | ||
README.md |
Backups
The backup scheme implemented in /etc/init.d/luci_statistics
aims to
limit writes to stable storage, to preserve flash memory lifetime.
(Flash-memory based routers may have limited lifetime of write cycles,
we want to conserve those.) While it would be simpler to run a periodic
backup as a cron job, you'd risk wearing out the flash memory. This
scheme only writes backups to flash during shutdowns/reboots and
upgrades.
The backup is only enabled if the administrator sets
luci_statistics.collectd_rrdtool.backup=1
.
We only want to restore a sysupgrade backup file if:
-
It was installed by
sysupgrade -r
(restore configuration files), and we have rebooted. In this case, there is an orderly shutdown that calls the shutdown methods. We do not want to overwrite the restored sysupgrade backup file during shutdown, but after reboot we do want to restore it. -
It was generated during a true sysupgrade, and we are rebooting into the new image:
sysupgrade
with any or none of-o
,-c
,-f
,-u
, resulting in a new image being installed and a config file being preserved for processing after reboot. In this case we do not want to overwrite the backup while rebooting during the upgrade.sysupgrade
in this case stores a.tgz
archive of all preserved files where it can be found after rebooting into the new image, and it does not run the shutdown scripts before rebooting.
When the administrator runs sysupgrade -b
(command line or LuCI), we
create a sysupgrade backup file and it is included in the combined
backup. Then the system continues running. When we later stop or
restart or reboot (orderly conditions, when
/etc/init.d/luci_statistics
is called to shut down), we do not want to
use the saved sysupgrade backup. If we had a control path after
sysupgrade -b
that would allow us to remove the sysupgrade backup, this
would be simple. But we don't!
What we can do is arrange that a sysupgrade backup contains enough information to indicate if it should be restored.
-
True sysupgrade is straightforward: we arrange that the backed-up file list only includes the sysupgrade backup file and one twin file (see below). The next starting of
/etc/init.d/luci_statistics
after a sysupgrade will restore the sysupgrade backup. -
Continued system operation after
sysupgrade -b
: next time we stop the service (during reboot or during other init script actions), we check for a stale sysupgrade backup, and if we detect it we remove it. -
sysupgrade -r
only unpacks the backup files, it does not erase other non-backed-up files still in the overlay. Its intended use is to then immediately reboot, which will run an orderly shutdown/normal backup. We must ensure the orderly shutdown in this case preserves the sysupgrade backup, unlike the previous case.
To implement these cases, we use a pair of twinned files, only one of which is included in the list of files preserved by sysupgrade. If we detect mismatched files (or only one file present) during service shutdown or startup, we trust that the sysupgrade backup should be kept and restored. If the files are matched, that indicates that we have not restored files since the sysupgrade backup, and the current normal backup should be used instead.
During sysupgrade backup
/etc/init.d/luci_statistics sysupgrade_backup
is invoked by sysupgrade
for true upgrade or for the -l
or -b
flags. We detect the list flag
(-l
) by checking the process environment, and if found, we only
generate a list: we don't actually do a backup. For all cases, we edit
the list of files listed already and remove any other mentions of
/etc/luci_statistics
to ensure that only the backup file and one of
the twin files is in the backup list.
During sysupgrade
During a true sysupgrade, only the sysupgrade backup file and one of the twin files is restored after the image reboots, so the first running of startup scripting will restore the sysupgrade backup. This could be at the time of first boot, if the image has been built to include this package, or it could be later when the package is downloaded, installed, and the service is started.
During backup (including orderly shutdown)
During backup (run during shutdown), if there is a matched set of twins,
then we know that sometime since the last service start the
administrator ran sysupgrade -b
and had the chance to copy the
resulting backup. We can now erase the twins and the sysupgrade backup.
If there is a mismatched set of twins, then someone restored a backup
such as with sysupgrade -r
and we should now be rebooting, so we
should leave the sysupgrade files alone to be processed on service
restart (after reboot).
If someone takes a sysupgrade -b
backup and then restores it before
they reboot or restart statistics, the twins will still match, and we
then don't keep the statistics from the restored backup, we instead take
a new backup from current data and use that on reboot.
During startup
If there are matched twin files (the normal case for shutdown/reboot without sysupgrade), then the sysupgrade backup is ignored and the regular backup is restored. If there are mismatched twin files, then the sysupgrade backup is restored.
During disorderly reboot
In a system crash or other disorderly reboot, the shutdown scripts do
not run. What remains on the system is the previous contents of
/etc/luci_statistics
.
-
If the system never started luci_statistics, or it was cleanly shut down before the crash, then there is no difference in behavior from normal startup: we restore either the sysupgrade backup (if luci_statistics had never run) or the regular backup (if luci_statistics was cleanly stopped)
-
If luci_statistics and collectd were running at the time of the crash, there could be a regular backup and a sysupgrade backup present, plus volatile data in /tmp (which are lost in the crash). The regular backup would be from the most recent time the system cleanly stopped luci_statistics. During the subsequent reboot/service start up:
-
If there is a sysupgrade backup on disk from having run
sysupgrade -b
, with both twin files matching (meaning the administrator had taken a backup sometime during the life of the system, before the crash), they are ignored and a regular backup (if any) is restored. -
If the sysupgrade backup has mismatched twin files or only one twin, then it is used to restore state. This would be the case if a sysupgrade restored configuration (
sysupgrade -r
), whether or not it did an orderly shutdown/reboot, or if the file system were damaged in a crash and only one of the twin files survived.
-