Correct way to execute BiT CLI as root (to show system tray icon)?

We have BiT qt GUI (root) but no corresponding starter script for BiT CLI (root). Is there any documentation or recommendation how to start it? Background: I want to test if sudo backintime --profile-id 1 --debug backup-job shows the sys tray icon if I start it as root. What is the recommended way of starting "backintime" as root so that the sys tray icon appears?

Hello, Actually I'd add a line to system-wide cron table or to root user's cron (via crontab -e) for running BiT as root (or system-wide if you pardon the term). The rationale is, BiT is probably doing it already that way, and it's the logical way from a sysadmin perspective, even if BiT is doing something different. Hope that helps, Cheers, Hakan On 23.11.2022 02:36, BiT dev wrote:

Very good point, adding BiT CLI to the system-wide crontab is what the BiT GUI (root) is doing and what is the most-accurate test case for me because that way no side effects apply from a manual call. Is there a way to manually start a cron job even if it is not yet due according to its schedule? That way I could force an execution for testing without waiting (for another coffee ;-) ? On Wed, 2022-11-23 at 10:36 +0300, Hakan Bayındır wrote:

I don't know any ways to nudge cron to run a job ahead of its schedule. Considering cron has no job identifiers, I don't think there's a way to do that, either. However, with a simple script, it's possible to write a cron line for a task one minute from now, and write it to a file. I don't know any faster way if you can consume that much of coffee per minute. :) Cheers, Hakan On 24.11.2022 01:12, BiT dev wrote:

Moin Am 23.11.2022 23:12 schrieb BiT dev:
Is there a way to manually start a cron job even if it is not yet due according to its schedule?
Not sure about that. But there is "faketime" (aka "faketimelib") which I use to create BIT snapshots at different dates. Maybe you can set a "faketime" and then restart the cron deamon. Something like this (pseudo bash): faketime -d "12:00" -c crond --restart

On Thu, 2022-11-24 at 07:43 +0000, c.buhtz@posteo.jp wrote:
faketime -d "12:00" -c crond --restart
Very good idea and I am just testing this! My Ubuntu 20.04 does not know the "-d" and "-c" options, do you use another version? I can run it without that but what is the meaning of these options? --- $ faketime --help Usage: faketime [switches] <timestamp> <program with arguments> This will run the specified 'program' with the given 'arguments'. The program will be tricked into seeing the given 'timestamp' as its starting date and time. The clock will continue to run from this timestamp. Please see the manpage (man faketime) for advanced options, such as stopping the wall clock and make it run faster or slower. The optional switches are: -m : Use the multi-threaded version of libfaketime -f : Use the advanced timestamp specification format (see manpage) --exclude-monotonic : Prevent monotonic clock from drifting (not the raw monotonic one) Examples: faketime 'last friday 5 pm' /bin/date faketime '2008-12-24 08:15:42' /bin/date faketime -f '+2,5y x10,0' /bin/bash -c 'date; while true; do echo $SECONDS ; sleep 1 ; done' faketime -f '+2,5y x0,50' /bin/bash -c 'date; while true; do echo $SECONDS ; sleep 1 ; done' faketime -f '+2,5y i2,0' /bin/bash -c 'date; while true; do date; sleep 1 ; done' In this single case all spawned processes will use the same global clock without restarting it at the start of each process. (Please note that it depends on your locale settings whether . or , has to be used for fractions)

Hey Folks, it is on my todo list to make my BIT-test-environment-helper-scripts publishable (is this a word?). For a first shoot I added my quick & dirty timefake script. It's intention is to call a command (CMD) once "each day" (means: multiple times) starting N days in the past. I use that script to create, manipulate and backup via BIT some test files each day (in the past). On 2022-12-05 17:18 BiT dev <python@altfeld-im.de> wrote:
It was just my pseudo code. ;) faketime -f '-7d' /bin/bash -c "CMD" The syntax for the "-f" values is described in the manpage of course. Here it means that the following command is executed with a datetime exactly 7 days in the past from now. Greetings Christian

Hello Christian, Thanks for the effort, it's greatly appreciated. While you polish them to a higher standard to be publishable*, is it possible to see the intermediate forms, so we (or at least I) can offer some feedback to make process simpler for you? As a sysadmin, I handle a lot of shell scripts, so I'd love to read yours and try to make it more readable, if you wish of course. Thanks again, Cheers, Hakan *: Thunderbird doesn't underline the word red, so I guess that's a word. On 7.12.2022 09:35, c.buhtz@posteo.jp wrote:

Hello, Actually I'd add a line to system-wide cron table or to root user's cron (via crontab -e) for running BiT as root (or system-wide if you pardon the term). The rationale is, BiT is probably doing it already that way, and it's the logical way from a sysadmin perspective, even if BiT is doing something different. Hope that helps, Cheers, Hakan On 23.11.2022 02:36, BiT dev wrote:

Hello, Actually I'd add a line to system-wide cron table or to root user's cron (via crontab -e) for running BiT as root (or system-wide if you pardon the term). The rationale is, BiT is probably doing it already that way, and it's the logical way from a sysadmin perspective, even if BiT is doing something different. Hope that helps, Cheers, Hakan On 23.11.2022 02:36, BiT dev wrote:

Very good point, adding BiT CLI to the system-wide crontab is what the BiT GUI (root) is doing and what is the most-accurate test case for me because that way no side effects apply from a manual call. Is there a way to manually start a cron job even if it is not yet due according to its schedule? That way I could force an execution for testing without waiting (for another coffee ;-) ? On Wed, 2022-11-23 at 10:36 +0300, Hakan Bayındır wrote:

I don't know any ways to nudge cron to run a job ahead of its schedule. Considering cron has no job identifiers, I don't think there's a way to do that, either. However, with a simple script, it's possible to write a cron line for a task one minute from now, and write it to a file. I don't know any faster way if you can consume that much of coffee per minute. :) Cheers, Hakan On 24.11.2022 01:12, BiT dev wrote:

Moin Am 23.11.2022 23:12 schrieb BiT dev:
Is there a way to manually start a cron job even if it is not yet due according to its schedule?
Not sure about that. But there is "faketime" (aka "faketimelib") which I use to create BIT snapshots at different dates. Maybe you can set a "faketime" and then restart the cron deamon. Something like this (pseudo bash): faketime -d "12:00" -c crond --restart

On Thu, 2022-11-24 at 07:43 +0000, c.buhtz@posteo.jp wrote:
faketime -d "12:00" -c crond --restart
Very good idea and I am just testing this! My Ubuntu 20.04 does not know the "-d" and "-c" options, do you use another version? I can run it without that but what is the meaning of these options? --- $ faketime --help Usage: faketime [switches] <timestamp> <program with arguments> This will run the specified 'program' with the given 'arguments'. The program will be tricked into seeing the given 'timestamp' as its starting date and time. The clock will continue to run from this timestamp. Please see the manpage (man faketime) for advanced options, such as stopping the wall clock and make it run faster or slower. The optional switches are: -m : Use the multi-threaded version of libfaketime -f : Use the advanced timestamp specification format (see manpage) --exclude-monotonic : Prevent monotonic clock from drifting (not the raw monotonic one) Examples: faketime 'last friday 5 pm' /bin/date faketime '2008-12-24 08:15:42' /bin/date faketime -f '+2,5y x10,0' /bin/bash -c 'date; while true; do echo $SECONDS ; sleep 1 ; done' faketime -f '+2,5y x0,50' /bin/bash -c 'date; while true; do echo $SECONDS ; sleep 1 ; done' faketime -f '+2,5y i2,0' /bin/bash -c 'date; while true; do date; sleep 1 ; done' In this single case all spawned processes will use the same global clock without restarting it at the start of each process. (Please note that it depends on your locale settings whether . or , has to be used for fractions)

Hey Folks, it is on my todo list to make my BIT-test-environment-helper-scripts publishable (is this a word?). For a first shoot I added my quick & dirty timefake script. It's intention is to call a command (CMD) once "each day" (means: multiple times) starting N days in the past. I use that script to create, manipulate and backup via BIT some test files each day (in the past). On 2022-12-05 17:18 BiT dev <python@altfeld-im.de> wrote:
It was just my pseudo code. ;) faketime -f '-7d' /bin/bash -c "CMD" The syntax for the "-f" values is described in the manpage of course. Here it means that the following command is executed with a datetime exactly 7 days in the past from now. Greetings Christian

Hello Christian, Thanks for the effort, it's greatly appreciated. While you polish them to a higher standard to be publishable*, is it possible to see the intermediate forms, so we (or at least I) can offer some feedback to make process simpler for you? As a sysadmin, I handle a lot of shell scripts, so I'd love to read yours and try to make it more readable, if you wish of course. Thanks again, Cheers, Hakan *: Thunderbird doesn't underline the word red, so I guess that's a word. On 7.12.2022 09:35, c.buhtz@posteo.jp wrote:

Hello, Actually I'd add a line to system-wide cron table or to root user's cron (via crontab -e) for running BiT as root (or system-wide if you pardon the term). The rationale is, BiT is probably doing it already that way, and it's the logical way from a sysadmin perspective, even if BiT is doing something different. Hope that helps, Cheers, Hakan On 23.11.2022 02:36, BiT dev wrote:
participants (3)
-
BiT dev
-
c.buhtz@posteo.jp
-
Hakan Bayındır