wordpress meta
title: 'Restic find and list one file'
date: '2021-01-17T07:52:03-06:00'
status: publish
permalink: /restic-find-and-list-one-file
author: admin
excerpt: ''
type: post
id: 1710
category:
- restic
tag: []
post_format: []
title: 'Restic find and list one file'
date: '2021-01-17T07:52:03-06:00'
status: publish
permalink: /restic-find-and-list-one-file
author: admin
excerpt: ''
type: post
id: 1710
category:
- restic
tag: []
post_format: []
Sometimes I just want to quickly look if one file exist in the latest snapshot and also see the size. Here is how.
Determine latest snapshot
```bash
restic snapshots | tail -10
09fdf7e5 2021-01-16 23:30:02 usph-vmli-do01 daily
/tank01/backups/sites3
````
Find
```bash
restic find -s 09fdf7e5 wpsites_dump.sql
repository 1144d629 opened successfully, password is correct Found matching entries in snapshot 09fdf7e5 from 2021-01-16 23:30:02 /tank01/backups/sites3/databases/wpsites_dump.sql ````
List
```bash
restic ls -l 09fdf7e5 /tank01/backups/sites3/databases/wpsites_dump.sql
repository 1144d629 opened successfully, password is correct snapshot 09fdf7e5 of [/tank01/src /tank01/stack /tank01/backups/sites3] filtered by [/tank01/backups/sites3/databases/wpsites_dump.sql] at 2021-01-16 23:30:02.785360824 -0600 CST): -rw-r--r-- 0 0 1326541 2021-01-16 20:00:13 /tank01/backups/sites3/databases/wpsites_dump.sql ````
List Directory
```bash root@desktop01:~# restic ls -l 09fdf7e5 /tank01/backups/sites3/databases repository 1144d629 opened successfully, password is correct snapshot 09fdf7e5 of [tank01/stack /tank01/backups/sites3] filtered by [/tank01/backups/sites3/databases] at 2021-01-16 23:30:02.785360824 -0600 CST): drwxr-xr-x 0 0 0 2020-05-25 09:02:19 /tank01/backups/sites3/databases ... -rw-r--r-- 0 0 1326541 2021-01-16 20:00:13 /tank01/backups/sites3/databases/wpsites_dump.sql ````