[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Copy/migrate archives/history with a new key?
- To: creed-january-twig@duck.com
- Subject: Re: Copy/migrate archives/history with a new key?
- From: Colin Percival <cperciva@tarsnap.com>
- Date: Tue, 26 Aug 2025 17:25:17 -0700
- Autocrypt: addr=cperciva@tarsnap.com; keydata= xsFNBGWMSrYBEACdWRqDn3B3SKO7IG0/fGHYtfs26f3Q5QeAcasy1fQLniwGQWn5rlILhbCD K/jdNoDm5Zxq20eqyffoDNObCjnHgg4tGANdi+RmDy+7CDpE789H8dss9y7Pt5DlGGAXQQnt hxush3EYS/Ctprd9UUL/lzOOLOU1aNtzB84tNrJBtcJmL7OYHfyTSNFxvedqJrrasejIQOLI t/DQ89BPzz+vsKHz7FJPXh3fsVkzLA00DJYcfkgxyABfJNA7U6yMwd4DVSdx/SsvfIDMVXnu UXCXswo106WPZbYGlZPpq0wW6iibtTerJix+8AeuwXvl9O1p8yESK4ErkIxCnmghTSz+pdzj z/6xBRkdDM9VdZ0r+CzsaNXMpDOzFuKyjaiYBdgCLljbDnXIHFcqXenrZ7Xwkm09g/M4uVSh pIUG2RYa6tsHSQoGCp3f2RZv1znfViKQFbbL83QjtPA20AhseZSYbHp1FPhXyy9J0wkGL16L e99g6gdGeIRE82BZjBjKGDkoyDPq+oDRSFl8NtzmIKy+cfz00nViqcTF4bREXEawFGhlpO0X O9q8mijI9iFB6zaPBiSdJGBL5ML5qLTNCl8Zlf4m1TBvmRTqF/lzMHVXHidDoUhpSh/y3AFZ 1KrYc27ztJQywDJPJPWPbtY8YhFLFs377gfP8WldsZjzp8nvoQARAQABzSVDb2xpbiBQZXJj aXZhbCA8Y3BlcmNpdmFAdGFyc25hcC5jb20+wsGRBBMBCAA7FiEEglY7hNBiDtwN+4ZBOJfy 4i5lrT8FAmWMSyYCGwMICwkNCAwHCwMFFQoJCAsFFgMCAQACHgUCF4AACgkQOJfy4i5lrT+i Yg/+PYyJNoFuygtV5t/skcjYmvEC93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: "tarsnap-users@tarsnap.com" <tarsnap-users@tarsnap.com>
- In-reply-to: <479D9975-2902-492E-8D79-5C2FEC86CBA8.1@smtp-inbound1.duck.com>
- References: <BCEC8938-F9E0-4FB6-BF19-3804F3C49B10.1@smtp-inbound1.duck.com> <D06D9CE6-4E01-4225-8D8A-368DBB2C0999.1@smtp-inbound1.duck.com> <CALfY4+-jQP8ybnESyEr7XKiXfu5Hh8Kg1g+SpS6aF7K1APJc=w@mail.gmail.com> <DD84DCC4-494F-4382-95DB-A443E704AEA1.1@smtp-inbound1.duck.com> <5C7B3690-6DEF-4100-A41D-F7A61AF6F110.1@smtp-inbound1.duck.com> <CALfY4+82K+BZntjRaFggw-9hE0063eFs16CHgmCUizfx8uJQeQ@mail.gmail.com> <5C024550-F388-4DD9-9336-B5F7B8B7FAAE.1@smtp-inbound1.duck.com> <86DC7026-9B17-45C5-9F89-60F9482B92CF.1@smtp-inbound1.duck.com> <CABaPp_j80nJ0vJFu9MC8T+jss2YkrKdnRr3gkdoTkffbjNbvsA@mail.gmail.com> <A524BF24-395E-4C7B-822F-297305274BB5.1@smtp-inbound1.duck.com> <63962DC0-A26A-4C72-8AC2-44B80098DCA5@icloud.com> <4C041DF7-4E20-4B79-AE6F-E809E8C266AE.1@smtp-inbound1.duck.com> <e67ec3af-0abb-4932-929d-241f8abab561@tarsnap.com> <62CBDC98-9AE1-4739-9815-0913DC16D2BD.1@smtp-inbound1.duck.com> <479D9975-2902-492E-8D79-5C2FEC86CBA8.1@smtp-inbound1.duck.com>
On 8/22/25 14:07, creed-january-twig@duck.com wrote:
I *literally* ran this by mistake:
tarsnap -c -f "new-prefix_test" @@Job_most-essential-files_2025-07-08_10-00-08
--print-stats \
/usr/local/etc/ /path/exclude.pattern.file \
-v --dry-run
If you have the latest version of tarsnap, this should have printed a warning
message along the lines of
> tarsnap: List of objects to archive includes '--dry-run'. This might not
be what you intended.
Once tarsnap sees a non-flag on the command line, everything else is treated
as a non-flag. So that's why this wasn't a dry run.
Changes were made on the server, and a "new-prefix_test" archive
indeed was created. Verified with 'tarsnap --fsck'.
For future reference, there's no need to run tarsnap --fsck unless you lose
your cache directory or tarsnap asks you to.
I had saved the full file list for each archive (in separate text files), and
also output of "tarsnap --print-stats -f '*'".
So I matched them after my mishap:
- Job_most-essential-files_2025-07-08_10-00-08: list of files in the archives
are exactly same before and after - Job_most-essential-files_2025-07-08_10-00-08
sizes before:
Job_most-essential-files_2025-07-08_10-00-08 841 MB 783 MB
(unique data) 5.0 MB 1.7 MB
- Job_most-essential-files_2025-07-08_10-00-08 sizes after (unique data
decreased):
Job_most-essential-files_2025-07-08_10-00-0 841 MB 783 MB
(unique data) 890 kB 288 kB
That makes sense, data was copied into a new archive so it's no longer unique
to that archive.
- new-prefix_test: its list of files is much smaller than the source archive.
But when I compared the file list they match exactly until new-prefix_test file ended.
As you see there is no ".part" in its name.
new-prefix_test 36 MB 15 MB
(unique data) 205 kB 37 kB
That's very strange. Is there anything interesting about the next file in the
old archive after the new archive stopped? I'm wondering if somehow tarsnap
failed in the middle of copying the archive... if that happened you should
have seen an error message though.
Will this command work (fixed, afaicu, version of what I actually ran)?:
tarsnap -c -f "new-prefix_test" @@oldarchive
--print-stats \
-X exclude.txt \
-v --dry-run
Are the orders of args fine? Or should @@oldarchive be moved to the end after
every arg has been passed as it was in your example?
You should put the @@oldarchive at the end.
And from the 'tips' docs page it looks like my 'excludes.file' should look like
this?:
-----
._*
.DS_Store
*.png *.PNG Library
These might need to be on different lines, otherwise I think tarsnap will
exclude anything named "*.png *.PNG Library".
Also: tarsnap-gui appends "Job_" as "Job_{job name}_{timestamp}" to every
archive name. Can I choose not to add that "Job_" or decide on my own how to
name the archive while still using the GUI?
I think the GUI lets you enter your own archive names when creating a single
archive, yes.
--
Colin Percival
FreeBSD Release Engineering Lead & EC2 platform maintainer
Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid