# Running kopia from cron, simple output option?

**URL:** <https://kopia.discourse.group/t/running-kopia-from-cron-simple-output-option/2768>\
**Category:** Support\
**Created:** [March 28, 2024, 5:44pm UTC](https://kopia.discourse.group/t/running-kopia-from-cron-simple-output-option/2768 "2024-03-28T17:44:32Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![ManChicken1911](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/manchicken1911/32/593_2.png) [@ManChicken1911](https://kopia.discourse.group/u/ManChicken1911)\
**Post date:** [March 28, 2024, 5:44pm UTC](https://kopia.discourse.group/t/running-kopia-from-cron-simple-output-option/2768/1 "2024-03-28T17:44:32Z")

</div>

I’m running a kopia snapshot job from cron on a Linux box a few times a day, which cron sends me a mail with the output of so I can keep an eye on it. However the mail is kind of a mess as it’s a capture of kopia’s output with the spinning progress character | / - etc, all piled up on one line like:

```auto
Snapshotting root@spark:/home/virtmail ...
  | 0 hashing, 0 hashed (0 B), 1 cached (217 B), uploaded 0 B, estimating... / 1 hashing, 16 hashed (4.6 MB), 23601 cached (12.4 GB), uploaded 198 B, estimating... * 0 hashing, 25 hashed (4.9 MB), 53254 cached (28.3 GB), uploaded 198 B, estimating...

```

As you can imagine depending on how much work the snapshot does, the number of progress updates can make for a long line (or a giant word-wrapped block as displayed in the email client.)

Is there an argument to make kopia just output one summary line at the end instead of the live progress update? I’m not really seeing anything that jumps out… I did see an old post about --disable-color but that’s not applicable here, using it still does the animated status.

Thanks

---

<div class="post-metadata">

**Author:** ![budy](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/budy/32/38_2.png) [@budy](https://kopia.discourse.group/u/budy)\
**Post date:** [April 1, 2024, 12:56pm UTC](https://kopia.discourse.group/t/running-kopia-from-cron-simple-output-option/2768/2 "2024-04-01T12:56:00Z")

</div>

To make the output more readable, you can use these options when running your snapshot: --no-progress --log-level=error --file-log-level=error

---

<div class="post-metadata">

**Author:** ![ManChicken1911](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/manchicken1911/32/593_2.png) [@ManChicken1911](https://kopia.discourse.group/u/ManChicken1911)\
**Post date:** [April 3, 2024, 11:05pm UTC](https://kopia.discourse.group/t/running-kopia-from-cron-simple-output-option/2768/3 "2024-04-03T23:05:45Z")

</div>

Ah thanks, `--no-progress` were the magic words. It’s not in the help! 😁

---

<div class="post-metadata">

**Author:** ![ekutner](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/ekutner/32/463_2.png) [@ekutner](https://kopia.discourse.group/u/ekutner)\
**Post date:** [April 4, 2024, 4:18am UTC](https://kopia.discourse.group/t/running-kopia-from-cron-simple-output-option/2768/4 "2024-04-04T04:18:16Z")

</div>

Check out [GitHub - ekutner/kopia-mon](https://github.com/ekutner/kopia-mon)

---

<div class="post-metadata">

**Author:** ![iBackup](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/ibackup/32/355_2.png) [@iBackup](https://kopia.discourse.group/u/iBackup)\
**Post date:** [April 4, 2024, 7:30am UTC](https://kopia.discourse.group/t/running-kopia-from-cron-simple-output-option/2768/5 "2024-04-04T07:30:46Z")

</div>

> Check out GitHub - ekutner/kopia-mon

Does it supports OAuth2? Asking due to Google will disable app password on [September 30, 2024](https://support.google.com/accounts/answer/6010255?hl=en)

---

<div class="post-metadata">

**Author:** ![kapitainsky](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/kapitainsky/32/535_2.png) [@kapitainsky](https://kopia.discourse.group/u/kapitainsky)\
**Post date:** [April 4, 2024, 8:01am UTC](https://kopia.discourse.group/t/running-kopia-from-cron-simple-output-option/2768/6 "2024-04-04T08:01:42Z")

</div>

> [@iBackup](#):
>
> Asking due to Google will disable app password on [September 30, 2024](https://support.google.com/accounts/answer/6010255?hl=en)

Google is not disabling app passwords. You misread it.

From official [Google Blog](https://workspaceupdates.googleblog.com/2023/09/winding-down-google-sync-and-less-secure-apps-support.html):

> If the app you are using does not support OAuth, you will need to [switch to an app that offers OAuth](https://support.google.com/a/answer/6260879#alternatives) or create an [app passwor](https://support.google.com/mail/answer/185833)d to access these apps.

---

<div class="post-metadata">

**Author:** ![iBackup](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/ibackup/32/355_2.png) [@iBackup](https://kopia.discourse.group/u/iBackup)\
**Post date:** [April 4, 2024, 8:26am UTC](https://kopia.discourse.group/t/running-kopia-from-cron-simple-output-option/2768/7 "2024-04-04T08:26:37Z")

</div>

Tnx for clarification !

I found [also this official answer too](https://www.googlecloudcommunity.com/gc/Workspace-Q-A/Will-App-Passwords-work-for-IMAP-after-Sept-30-2024/m-p/715290?nobounce), that confirms that app password will still works if 2FA activated on a google account

---

<div class="post-metadata">

**Author:** ![ekutner](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/ekutner/32/463_2.png) [@ekutner](https://kopia.discourse.group/u/ekutner)\
**Post date:** [April 4, 2024, 10:09am UTC](https://kopia.discourse.group/t/running-kopia-from-cron-simple-output-option/2768/8 "2024-04-04T10:09:48Z")

</div>

It doesn’t currently support OAuth but since I’m using gmail with this script, if at some point it becomes a requirement and there is no other easy alternative I’ll probably just add support for it.

---

<div class="post-metadata">

**Author:** ![santacruzskim](https://avatars.discourse-cdn.com/v4/letter/s/b3f665/32.png) [@santacruzskim](https://kopia.discourse.group/u/santacruzskim)\
**Post date:** [April 5, 2024, 7:51pm UTC](https://kopia.discourse.group/t/running-kopia-from-cron-simple-output-option/2768/9 "2024-04-05T19:51:39Z")

</div>

just curious, what does the output look like now? Can you provide an example? Are you losing any info with `--no progress`? I ask because everything in your original output was essentially “progress” information. Not a summary of what happened.

---

<div class="post-metadata">

**Author:** ![ManChicken1911](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/manchicken1911/32/593_2.png) [@ManChicken1911](https://kopia.discourse.group/u/ManChicken1911)\
**Post date:** [April 5, 2024, 8:16pm UTC](https://kopia.discourse.group/t/running-kopia-from-cron-simple-output-option/2768/10 "2024-04-05T20:16:43Z")

</div>

Now I get:

```auto
Snapshotting root@spark:/home/virtmail ...
Created snapshot with root k1fcf7f056e66b49d1fb39e9fb0566827 and ID 7102eeb27b5074c851b158aff25ff7fe in 8s

```

which for me is good enough to keep my eye on the fact that it’s running when it should and doing something (I haven’t run into any snapshot errors yet so I don’t know what that looks like.)

I don’t necessarily mind seeing the actual progress, but the formatting is just not ideal… In a terminal it’s a single status line that animates and updates live and looks nice, but when piped into a file/email it’s a concatenated (sometimes giant) block of unformatted text that your eyes just skip over as unreadable, so it’s not useful to me in this particular context.

---

<div class="post-metadata">

**Author:** ![santacruzskim](https://avatars.discourse-cdn.com/v4/letter/s/b3f665/32.png) [@santacruzskim](https://kopia.discourse.group/u/santacruzskim)\
**Post date:** [April 11, 2024, 10:25pm UTC](https://kopia.discourse.group/t/running-kopia-from-cron-simple-output-option/2768/11 "2024-04-11T22:25:28Z")

</div>

Thanks. Not ideal, but it gets the job done. I’ll be checking out “kopia-mon” at some point as well. Thanks @ekutner for the project.
