# How do you guys check what has been backed up?

**URL:** <https://forum.duplicati.com/t/how-do-you-guys-check-what-has-been-backed-up/11366>\
**Category:** Support\
**Created:** [December 17, 2020, 11:00am UTC](https://forum.duplicati.com/t/how-do-you-guys-check-what-has-been-backed-up/11366 "2020-12-17T11:00:44Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Haron](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/h/13edae/32.png) [@Haron](https://forum.duplicati.com/u/Haron)\
**Post date:** [December 17, 2020, 11:00am UTC](https://forum.duplicati.com/t/how-do-you-guys-check-what-has-been-backed-up/11366/1 "2020-12-17T11:00:44Z")

</div>

Hi all,

As you all understand, sometimes our precious files may be accidentally changed (or intentionally encrypted by a virus). How do you monitor list of files backed up after each backup cycle? Especially remotely.

Thanks for sharing,

---

<div class="post-metadata">

**Author:** ![ts678](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@ts678](https://forum.duplicati.com/u/ts678)\
**Post date:** [December 19, 2020, 5:09pm UTC](https://forum.duplicati.com/t/how-do-you-guys-check-what-has-been-backed-up/11366/2 "2020-12-19T17:09:55Z")

</div>

> [@Haron](#):
>
> How do you monitor list of files backed up after each backup cycle? Especially remotely.

[The COMPARE command](https://duplicati.readthedocs.io/en/latest/04-using-duplicati-from-the-command-line/#the-compare-command) can be run remotely whenever you like, and shows latest changes by default.

[Commandline](https://duplicati.readthedocs.io/en/latest/03-using-the-graphical-user-interface/#using-the-command-line-tools-from-within-the-graphical-user-interface) is easy way to see how it goes, however for long-term you can [Export as Command-line](https://duplicati.readthedocs.io/en/latest/03-using-the-graphical-user-interface/#exporting-a-backup-job-configuration), editing that from `backup` to `compare` syntax. Once that works, you can script it, then use [run-script-after](https://duplicati.readthedocs.io/en/latest/06-advanced-options/#run-script-after).

How (and how often) you get to read the reports is up to you. [Where does script output go to (difference between BEFORE and AFTER?)](https://forum.duplicati.com/t/where-does-script-output-go-to-difference-between-before-and-after/9571) might be one way if you need them in an email. Http has a length limit.

[Is it possible to get the backed up files listed in the log?](https://forum.duplicati.com/t/is-it-possible-to-get-the-backed-up-files-listed-in-the-log/1003)  
[How I can see what files was added to backup?!](https://forum.duplicati.com/t/how-i-can-see-what-files-was-added-to-backup/2231)

---

<div class="post-metadata">

**Author:** ![Haron](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/h/13edae/32.png) [@Haron](https://forum.duplicati.com/u/Haron)\
**Post date:** [December 20, 2020, 12:03am UTC](https://forum.duplicati.com/t/how-do-you-guys-check-what-has-been-backed-up/11366/3 "2020-12-20T00:03:08Z")

</div>

Awesome, thank you, this helped. I’ve converted the script into macOS shell (see here [Email list of backed up files](https://forum.duplicati.com/t/email-list-of-backed-up-files/978/2)).

But it isn’t working well because is sends a report _every_ backup run whereas sometimes there are no changes ( = no need to report). How can script-after detect that nothing has been backed up on the _current_ run? Is there an environment variable that hold this value?  
See the same question here: [How I can see what files was added to backup?!](https://forum.duplicati.com/t/how-i-can-see-what-files-was-added-to-backup/2231/9) .

---

<div class="post-metadata">

**Author:** ![Haron](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/h/13edae/32.png) [@Haron](https://forum.duplicati.com/u/Haron)\
**Post date:** [December 20, 2020, 12:16am UTC](https://forum.duplicati.com/t/how-do-you-guys-check-what-has-been-backed-up/11366/4 "2020-12-20T00:16:51Z")

</div>

Trying to build some logic based on `DUPLICATI__RESULTFILE`.  
How could it be that after two consequent runs `Modified files` \> 0? See trimmed log below.

```
Modified files: 1
Size of backup 0: 204 bytes
DeletedFiles: 0
DeletedFolders: 0
ModifiedFiles: 0
ExaminedFiles: 1
OpenedFiles: 0
AddedFiles: 0
NotProcessedFiles: 0
AddedFolders: 0
TooLargeFiles: 0
FilesWithError: 0
ModifiedFolders: 0
ModifiedSymlinks: 0
AddedSymlinks: 0
DeletedSymlinks: 0
PartialBackup: False
MainOperation: Backup
ParsedResult: Success
Version: 2.0.5.1 (2.0.5.1_beta_2020-01-18)

```

---

<div class="post-metadata">

**Author:** ![ts678](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@ts678](https://forum.duplicati.com/u/ts678)\
**Post date:** [December 20, 2020, 1:14am UTC](https://forum.duplicati.com/t/how-do-you-guys-check-what-has-been-backed-up/11366/5 "2020-12-20T01:14:23Z")

</div>

> [@Haron](#):
>
> How could it be that after two consequent runs `Modified files` \> 0? See trimmed log below.
> 
> ```plaintext
> Modified files: 1
> Size of backup 0: 204 bytes
> DeletedFiles: 0
> DeletedFolders: 0
> ModifiedFiles: 0
> 
> ```

Are you looking at the first line? My DUPLICATI\_\_RESULTFILE doesn’t have either of your first two.  
I don’t understand the question anyway. Modified files needs modifying source files, not doing runs.

---

<div class="post-metadata">

**Author:** ![Haron](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/h/13edae/32.png) [@Haron](https://forum.duplicati.com/u/Haron)\
**Post date:** [December 20, 2020, 1:31am UTC](https://forum.duplicati.com/t/how-do-you-guys-check-what-has-been-backed-up/11366/6 "2020-12-20T01:31:18Z")

</div>

> My DUPLICATI\_\_RESULTFILE doesn’t have either of your first two.

Oh sorry, my bad. These are two _last_ lines of “compare”. My bad, forgot to add a line break, and confused myself 🙂

> I don’t understand the question anyway.

The question is: is there a simple way for run-script-after to figure out whether the _current_ backup operation has found any changes?

---

<div class="post-metadata">

**Author:** ![ts678](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@ts678](https://forum.duplicati.com/u/ts678)\
**Post date:** [December 20, 2020, 2:33am UTC](https://forum.duplicati.com/t/how-do-you-guys-check-what-has-been-backed-up/11366/7 "2020-12-20T02:33:10Z")

</div>

> [@Haron](#):
>
> is there a simple way for run-script-after to figure out whether the _current_ backup operation has found any changes?

Probably not simpler than looking at stats. It seems like it should be pretty simple, e.g. does this give 5?

> egrep --count ‘^(DeletedFiles: 0|DeletedFolders: 0|ModifiedFiles: 0|AddedFiles: 0|AddedFolders: 0)$’

Why was “current” italicized? run-script-after gets stats for current backup, meaning the one that just ran.

One effect of no change is that no new backup version is made unless [upload-unchanged-backups](https://duplicati.readthedocs.io/en/latest/06-advanced-options/#upload-unchanged-backups) is set. Figuring that out might be harder than looking at stats, which shell code could perhaps also handle for you.

---

<div class="post-metadata">

**Author:** ![Haron](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/h/13edae/32.png) [@Haron](https://forum.duplicati.com/u/Haron)\
**Post date:** [December 20, 2020, 7:40am UTC](https://forum.duplicati.com/t/how-do-you-guys-check-what-has-been-backed-up/11366/8 "2020-12-20T07:40:07Z")

</div>

> Probably not simpler than looking at stats. It seems like it should be pretty simple, e.g. does this give 5?

Awesome, together we did it 🙂

Have a look at the most recent version ([Email list of backed up files - #2 by Haron](https://forum.duplicati.com/t/email-list-of-backed-up-files/978/2)).

Probably worth moving to HowTo.

> Why was “current” italicized? run-script-after gets stats for current backup, meaning the one that just ran.

Just to make it clear that I’m talking about backup operation context, not compare operation.
