rdiff-backup-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to restore, overwriting existing files but not removing other fi


From: Eric Lavarde
Subject: Re: How to restore, overwriting existing files but not removing other files
Date: Sat, 20 Jan 2024 13:59:16 +0100
User-agent: Roundcube Webmail/1.3.7

Hi,

On 19.01.2024 03:22, Exuvo wrote:
Some of my files got corrupted in /destination ex /destionation/a and
/destionation/b.
I have rdiff-backups of a few of the directories in /destination but
not all via --exclude lines ex /destionation/c.
Restoring with "rdiff-backup restore backupDir /destination" says
ERROR target path /destination exists and isnt empty, call with
--force to overwrite.
So i tried with force but that then starts deleting everything that
was excluded instead of just overwriting conflicts.
How do i get it to restore the backup but not deleting everything that
was not in the backup?

I still have my tape backups of everything rdiff-deleted so nothing is
lost but that is going to take two days to restore.

There are multiple ways to do it, here as examples:

mkdir /tmp/from
for x in a b c; do echo original > /tmp/from/$x; done
rdiff-backup backup /tmp/from /tmp/bak
for x in a b c; do echo modified > /tmp/from/$x; done
# if you have few files to exclude (multiple excludes are possible)
rdiff-backup --force restore --exclude /tmp/from/c /tmp/bak /tmp/from
# if you have few files to include (multiple includes are possible)
rdiff-backup --force restore --include /tmp/from/a --exclude \** /tmp/bak /tmp/from
# if you have only one file to restore
rdiff-backup --force restore /tmp/bak/a /tmp/from/a

So, basically, as you restore, excluded files are being simply ignored and left alone.

Hope this helps,
Eric
--
Eric de France, d'Allemagne et de Navarre



reply via email to

[Prev in Thread] Current Thread [Next in Thread]