I have various backup routines in place, some with nightly tarballs, some with rsync+hardlink snapshots…
I’ve been using restic instead for about a month now and am seeing great results from the deduplication, and would like to merge all my older snapshots into my restic repository now
So in my restic repo right now I have:
$ restic snapshots
repository 4ae829a8 opened successfully, password is correct
ID Date Host Tags Directory
----------------------------------------------------------------------
d7b4e7dc 2018-08-31 19:32:24 chris-desktop /home/chris
196b9069 2018-11-05 21:21:16 chris-desktop /home/chris
3503188d 2018-11-06 07:35:29 chris-desktop /home/chris
b8a0ed0a 2018-11-07 07:35:18 chris-desktop /home/chris
d36b7634 2018-11-08 07:35:05 chris-desktop /home/chris
# ...
6f2f2d62 2018-12-05 07:35:09 chris-desktop /home/chris
ab67016c 2018-12-06 07:35:06 chris-desktop /home/chris
be494dfc 2018-12-07 07:35:11 chris-desktop /home/chris
d9a75cf3 2018-12-07 18:47:15 chris-desktop /home/chris
----------------------------------------------------------------------
35 snapshots
and:
$ ls -lh
total 2.3T
-rw-r--r-- 1 root root 2.1G Dec 30 2015 home.2015-12-30.tbz
-rw-r--r-- 1 root root 2.2G Jan 1 2016 home.2016-01-01.tbz
-rw-r--r-- 1 root root 3.0G Jan 8 2016 home.2016-01-08.tbz
-rw-r--r-- 1 root root 3.0G Jan 22 2016 home.2016-01-22.tbz
-rw-r--r-- 1 root root 3.8G Feb 27 2016 home.2016-02-27.tbz
-rw-r--r-- 1 root root 4.1G Mar 4 2016 home.2016-03-04.tbz
-rw-r--r-- 1 root root 6.2G Mar 11 2016 home.2016-03-11.tbz
-rw-r--r-- 1 root root 8.1G Mar 18 2016 home.2016-03-18.tbz
-rw-r--r-- 1 root root 27G Mar 25 2016 home.2016-03-25.tbz
# ...
-rw-r--r-- 1 root root 45G Jul 24 09:36 home.2018-07-24.tbz
-rw-r--r-- 1 root root 45G Jul 31 09:45 home.2018-07-31.tbz
-rw-r--r-- 1 root root 46G Aug 7 09:44 home.2018-08-07.tbz
-rw-r--r-- 1 root root 46G Aug 14 09:46 home.2018-08-14.tbz
-rw-r--r-- 1 root root 46G Aug 21 09:55 home.2018-08-21.tbz
-rw-r--r-- 1 root root 47G Aug 28 10:02 home.2018-08-28.tbz
It seems like I want to script extracting these .tbz files one at a time, snapshotting them, and then deleting them. I can override the date with --time
but it doesn’t look like there’s any way to override the metadata directory which I’d like to say /home/chris
but obviously I can’t extract there
i.e. I want to snapshot from /mnt/backup/home.2015-12-30/
but record /home/chris
as the path in the snapshot metadata
Is it true that the directory not matching wouldn’t impact the efficiency of the deduplication and/or speed of snapshots?
I could deal with the path not matching in this case for my desktop backups, but keeping those correct will matter a lot more when I port the repo where I have snapshots of several paths across a dozen application servers.
Any tips or links to prior art on anything like this would be appreciated!