linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* send | receive: received snapshot is missing recent files
@ 2017-09-06  5:37 Dave
       [not found] ` <CAH=dxU7RM7s+pxT=wxE9WcUNMWjSG_A0=1pUWD1dWGVQ6g+g8Q@mail.gmail.com>
  0 siblings, 1 reply; 11+ messages in thread
From: Dave @ 2017-09-06  5:37 UTC (permalink / raw)
  To: linux-btrfs

I'm running Arch Linux on BTRFS. I use Snapper to take hourly
snapshots and it works without any issues.

I have a bash script that uses send | receive to transfer snapshots to
a couple external HDD's. The script runs daily on a systemd timer. I
set all this up recently and I first noticed that it runs every day
and that the expected snapshots are received.

At a glance, everything looked correct. However, today was my day to
drill down and really make sure everything was working.

To my surprise, the newest received incremental snapshots are missing
all recent files. These new snapshots reflect the system state from
weeks ago and no files more recent than a certain date are in the
snapshots.

However, the snapshots are newly created and newly received. The work
is being done fresh each day when my script runs, but the results are
anchored back in time at this earlier date. Weird.

I'm not really sure where to start troubleshooting, so I'll start by
sharing part of my script. I'm sure the problem is in my script, and
is not related to BTRFS or snapper functionality. (As I said, the
Snapper snapshots are totally OK before being sent | received.

These are the key lines of the script I'm using to send | receive a snapshot:

    old_num=$(snapper -c "$config" list -t single | awk
'/'"$selected_uuid"'/ {print $1}')
    old_snap=$SUBVOLUME/.snapshots/$old_num/snapshot
    new_num=$(snapper -c "$config" create --print-number)
    new_snap=$SUBVOLUME/.snapshots/$new_num/snapshot
    btrfs send -c "$old_snap" "$new_snap" | $ssh btrfs receive
"$backup_location"

I have to admit that even after reading the following page half a
dozen times, I barely understand the difference between -c and -p.
https://btrfs.wiki.kernel.org/index.php/FAQ#What_is_the_difference_between_-c_and_-p_in_send.3F

After reading that page again today, I feel like I should switch to -p
(maybe). However, the -c vs -p choice probably isn't my problem.

Any ideas what my problem could be?

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-09-13 16:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-06  5:37 send | receive: received snapshot is missing recent files Dave
     [not found] ` <CAH=dxU7RM7s+pxT=wxE9WcUNMWjSG_A0=1pUWD1dWGVQ6g+g8Q@mail.gmail.com>
2017-09-06 19:46   ` Dave
2017-09-07  4:43     ` Dave
2017-09-07  6:24       ` A L
2017-09-07 12:39         ` Dave
2017-09-07 13:34           ` Dave
2017-09-07 14:33             ` Axel Burri
2017-09-08  4:44               ` Dave
2017-09-11 17:53                 ` Axel Burri
2017-09-12  3:19                   ` Andrei Borzenkov
2017-09-13 16:52                     ` Dave

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).