Hi
Not sure how or when but sometime in the last 48 hours or so I lost my contacts (synced to android via Davx5). I have backups, but I want to restore to just contacts to a point in time. Is it a case of making a copy of my existing backups, deleting all the newer files (newer than when I want to restore to), then running:
export PASSPHRASE=$(cat your_backup_secret_key_file.txt)
sudo -E duplicity restore --force file:///path/to/copied/files /home/restore/
Where are the contact files in the /home/restore/ folder located? And can I just copy them to the correct location on the server (make sure permissions are correct) and all should be good?
First a check, you’re not hit by this Nginx update broke Nextcloud
Your contacts are in the nextcloud database. You might get away with just restoring the nextcloud part of the backup. If you have been doing other stuff with nextcloud, you should be carefull as that will also be impacted.
oh actually I might be. I did see that but my calendar is still working so I dismissed it, but it could be what caused it.
Turns out the actual restore procedure for contacts is certainly not what I posted and I’ll come back with the actual process to restore just contacts to a point in time.
Grab the backup files, export the secret key, then
run: duplicity collection-status file:///mnt/backups/box
This will display all the available backups with time
run: duplicity restore --time 2026-08-14T01:49:09Z --file-to-restore owncloud file://mnt/backups/box/ /mnt/restorelocation/
This will restore the point in time backup just the owncloud.db file
The owncloud.db file is an sqlite database with contacts in oc_cards table. You can use an sqlite browser to get data, or use:
sqlite3 owncloud.db "SELECT carddata FROM oc_cards;" > contacts.vcf
Go to browser, MAIB server contacts, and import the vcf.