Re: Restore the most recent version of a file/directory?

tink via Duplicity-talk <[email protected]>
Newsgroups gmane.comp.sysutils.backup.duplicity.general
Message-ID <CAAfwjx52Z3Z_Mv6H546CLrzvGnpoH+fN-JUX9VYwgZ0oH-GKTA@mail.gmail.com>
On Thu, 14 Nov 2024 at 01:25, edgar.soldin--- via Duplicity-talk <
[email protected]> wrote:

> hey tink,
>
Hello again, Edgar!



> > So I managed to get a reasonably stable way of backing up to Wasabi
> (thanks to everyone on the list who helped me with that initially!!) and am
> now trying to restore a machine (for testing) from my backups ...
>
> good idea :)
>
Heh. Ta, I thought so, too!


> > how do I get the most recent version of a file? I've played with -t
> options (or leaving them off all together), but I always get one particular
> file in the version of Aug 15th rather than e.g. Nov 11th.
>
> well. usually you
> 1. start by listing backups with `collection-status` which will give you a
> time stamped list of backups.
> 2. use a time stamp that lies between two backups or the exact (not rly
> needed) to "select" the younger backup to restore from via `--time` option
>
OK, so I tried to follow those steps just then and still got the "August"
file.



> please post your collection status,

duplicity  --s3-endpoint-url https://s3.ZZZ-YYY-2.wasabisys.com
collection-status "s3:///XXX/backups"
Collection Status
-----------------
Connecting with backend: BackendWrapper
Archive dir: /root/.cache/duplicity/22d8d156708c5411aeb8a9162002c073

Found 2 secondary backup chain(s).
Secondary chain 1 of 2:
-------------------------
Chain start time: Fri Aug 30 08:44:08 2024
Chain end time: Thu Sep 26 14:43:53 2024
Number of contained backup sets: 6
Total number of contained volumes: 34782
 Type of backup set:                            Time:      Num volumes:
                Full         Fri Aug 30 08:44:08 2024             17086
         Incremental         Thu Sep  5 09:54:00 2024               166
         Incremental         Fri Sep 13 11:10:05 2024               156
         Incremental         Thu Sep 19 09:00:03 2024                 1
         Incremental         Mon Sep 23 10:25:25 2024             17185
         Incremental         Thu Sep 26 14:43:53 2024               188
-------------------------

Secondary chain 2 of 2:
-------------------------
Chain start time: Thu Oct  3 09:45:02 2024
Chain end time: Thu Oct 31 09:06:23 2024
Number of contained backup sets: 6
Total number of contained volumes: 17988
 Type of backup set:                            Time:      Num volumes:
                Full         Thu Oct  3 09:45:02 2024                 1
         Incremental         Thu Oct  3 10:26:40 2024             17382
         Incremental         Thu Oct 10 09:04:12 2024               147
         Incremental         Thu Oct 17 09:04:06 2024               153
         Incremental         Thu Oct 24 09:04:09 2024               149
         Incremental         Thu Oct 31 09:06:23 2024               156
-------------------------


Found primary backup chain with matching signature chain:
-------------------------
Chain start time: Fri Nov  8 13:33:03 2024
Chain end time: Thu Nov 14 09:06:26 2024
Number of contained backup sets: 2
Total number of contained volumes: 17820
 Type of backup set:                            Time:      Num volumes:
                Full         Fri Nov  8 13:33:03 2024             17665
         Incremental         Thu Nov 14 09:06:26 2024               155
-------------------------
Also found 0 backup set(s) not part of any chain,
and 3 incomplete backup set(s).
These may be deleted by running duplicity with the "cleanup" command.

Out of the above I was hoping to get yesterday's backup



restore command lines and their outputs for us to see what is goin on.
>
duplicity \
   -v d \
   --s3-endpoint-url https://s3.ZZ-YYY-2.wasabisys.com \
   --progress \
   -t 1D \
   restore  --path-to-restore postgres.domain.com  \
   "s3://XXX/backup" \
   /tmp/restoretest/

GPG binary is /usr/bin/gpg, version 2.2.19
Import of duplicity.backends._testbackend Succeeded
Import of duplicity.backends.adbackend Succeeded
Import of duplicity.backends.azurebackend Succeeded
Import of duplicity.backends.b2backend Succeeded
Import of duplicity.backends.boxbackend Succeeded
Import of duplicity.backends.cfbackend Succeeded
Import of duplicity.backends.dpbxbackend Succeeded
Import of duplicity.backends.gdocsbackend Succeeded
Import of duplicity.backends.gdrivebackend Succeeded
Import of duplicity.backends.giobackend Succeeded
Import of duplicity.backends.hsibackend Succeeded
Import of duplicity.backends.hubicbackend Succeeded
Import of duplicity.backends.idrivedbackend Succeeded
Import of duplicity.backends.imapbackend Succeeded
Import of duplicity.backends.jottacloudbackend Succeeded
Import of duplicity.backends.lftpbackend Succeeded
Import of duplicity.backends.localbackend Succeeded
Import of duplicity.backends.mediafirebackend Succeeded
Import of duplicity.backends.megabackend Succeeded
Import of duplicity.backends.megav2backend Succeeded
Import of duplicity.backends.megav3backend Succeeded
Import of duplicity.backends.multibackend Succeeded
Import of duplicity.backends.ncftpbackend Succeeded
Import of duplicity.backends.onedrivebackend Succeeded
Import of duplicity.backends.par2backend Succeeded
Import of duplicity.backends.pcabackend Succeeded
Import of duplicity.backends.pydrivebackend Succeeded
Import of duplicity.backends.rclonebackend Succeeded
Import of duplicity.backends.rsyncbackend Succeeded
Import of duplicity.backends.s3_boto3_backend Succeeded
Import of duplicity.backends.slatebackend Succeeded
Import of duplicity.backends.ssh_paramiko_backend Succeeded
Import of duplicity.backends.ssh_pexpect_backend Succeeded
Import of duplicity.backends.swiftbackend Succeeded
Import of duplicity.backends.sxbackend Succeeded
Import of duplicity.backends.tahoebackend Succeeded
Import of duplicity.backends.webdavbackend Succeeded
Import of duplicity.backends.xorrisobackend Succeeded
Using archive dir: /root/.cache/duplicity/f24ae946dd6e7152fe8bd268761fc94c
Using backup name: f24ae946dd6e7152fe8bd268761fc94c
Acquiring lockfile
/root/.cache/duplicity/f24ae946dd6e7152fe8bd268761fc94c/lockfile
================================================================================
duplicity 2.2.4
Args: /root/.pyenv/versions/duplicity/bin/duplicity -v d --s3-endpoint-url
https://s3.ZZ-YYY-2.wasabisys.com --progress -t 1D restore
--path-to-restore postgres.domain.com s3://XXX/backup /tmp/restoretest/
Linux backup2-wlg 5.4.0-200-generic #220-Ubuntu SMP Fri Sep 27 13:19:16 UTC
2024 x86_64 x86_64
/root/.pyenv/versions/duplicity/bin/python 3.9.19 (main, Jul 31 2024,
08:38:40)
[GCC 9.4.0]
================================================================================
Using temporary directory /tmp/duplicity-zpbpo2mo-tempdir
Registering (mkstemp) temporary file
/tmp/duplicity-zpbpo2mo-tempdir/mkstemp-4py0cg8c-1
Temp has 26607943680 available, backup will use approx 272629760.
Listed s3://XXX/backup/
... tens of thousands of lines trimmed ...
42433 file(s) exists on backend
8 file(s) exist in cache
Extracting backup chains from list of files:
File  is not part of a known set; creating new set
Ignoring file (rejected by backup set) ''
File duplicity-full-signatures.20240723T030236Z.sigtar.gpg is not part of a
known set; creating new set
Ignoring file (rejected by backup set)
'duplicity-full-signatures.20240723T030236Z.sigtar.gpg'
File duplicity-full.20240723T030236Z.manifest.gpg is not part of a known
set; creating new set
Processing local manifest
/root/.cache/duplicity/f24ae946dd6e7152fe8bd268761fc94c/duplicity-full.20240723T030236Z.manifest
(204444860)
Found manifest volume 1
...thousands of lines removed...
Found manifest volume 17296
Found manifest volume 17297
Found manifest volume 17298
Found 17298 volumes in manifest
File duplicity-full.20240723T030236Z.vol1.difftar.gpg is part of known set
File duplicity-full.20240723T030236Z.vol10.difftar.gpg is part of known set
File duplicity-full.20240723T030236Z.vol100.difftar.gpg is part of known set
...lots removed ...
Local and Remote metadata are synchronized, no sync needed.
Last full backup date: Tue Jul 23 15:02:36 2024
Collection Status
-----------------
Connecting with backend: BackendWrapper
Archive dir: /root/.cache/duplicity/f24ae946dd6e7152fe8bd268761fc94c

Found 0 secondary backup chain(s).

Found primary backup chain with matching signature chain:
-------------------------
Chain start time: Tue Jul 23 15:02:36 2024
Chain end time: Thu Aug 15 11:02:02 2024
Number of contained backup sets: 3
Total number of contained volumes: 17762
 Type of backup set:                            Time:      Num volumes:
                Full         Tue Jul 23 15:02:36 2024             17298
         Incremental         Wed Jul 31 12:15:25 2024               205
         Incremental         Thu Aug 15 11:02:02 2024               259
-------------------------
Also found 0 backup set(s) not part of any chain,
and 4 incomplete backup set(s).
These may be deleted by running duplicity with the "cleanup" command.
Processing local manifest
/root/.cache/duplicity/f24ae946dd6e7152fe8bd268761fc94c/duplicity-full.20240723T030236Z.manifest
(204444860)
... thousands of lines trimmed ...
Found manifest volume 256
Found manifest volume 257
Found manifest volume 258
Found manifest volume 259
Found 259 volumes in manifest
Registering (mktemp) temporary file
/tmp/duplicity-zpbpo2mo-tempdir/mktemp-gbuiy95w-4
Writing etc of type dir
Making directory /tmp/restoretest/etc
Writing etc/.pwd.lock of type reg
Writing etc/NetworkManager of type dir
Making directory /tmp/restoretest/etc/NetworkManager
... thousands of lines trimmed ...
Forgetting temporary file /tmp/duplicity-zpbpo2mo-tempdir/mktemp-j8vteb0p-16
Processed volume 39 of 17762
Registering (mktemp) temporary file
/tmp/duplicity-zpbpo2mo-tempdir/mktemp-1ny_z079-41
Writing var/backups/postgres/tuakiri_confluence_test-2023-12-12.sql.gz of
type reg
Deleting /tmp/duplicity-zpbpo2mo-tempdir/mktemp-1ny_z079-41
Forgetting temporary file
/tmp/duplicity-zpbpo2mo-tempdir/mktemp-1ny_z079-41b
Processed volume 40 of 17762
Registering (mktemp) temporary file
/tmp/duplicity-zpbpo2mo-tempdir/mktemp-pmpno7cs-42
Writing var/backups/shadow.bak of type reg
Deleting /tmp/duplicity-zpbpo2mo-tempdir/mktemp-pmpno7cs-42
Forgetting temporary file /tmp/duplicity-zpbpo2mo-tempdir/mktemp-pmpno7cs-42
Processed volume 41 of 17762
Releasing lockfile
/root/.cache/duplicity/f24ae946dd6e7152fe8bd268761fc94c/lockfile
Removing still remembered temporary file
/tmp/duplicity-zpbpo2mo-tempdir/mkstemp-4py0cg8c-1

So it looks like it only picks up the oldest backup even though

Full         Fri Nov  8 13:33:03 2024             17665
is listed?



> sunny regards ..ede/duply.net
>
Best regards,
Tink

_______________________________________________
Duplicity-talk mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/duplicity-talk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.