[pve-devel] [RFC container v2 23/25] backup: implement restore for external providers
Fiona Ebner
f.ebner at proxmox.com
Fri Sep 13 15:05:01 CEST 2024
Am 13.09.24 um 08:35 schrieb Fabian Grünbichler:
>
>> Fiona Ebner <f.ebner at proxmox.com> hat am 12.09.2024 16:08 CEST geschrieben:
>>
>>
>> Am 12.09.24 um 15:56 schrieb Fiona Ebner:
>>> Am 12.09.24 um 14:43 schrieb Fabian Grünbichler:
>>>> On August 13, 2024 3:28 pm, Fiona Ebner wrote:
>>>>> + } elsif ($mechanism eq 'directory') {
>>>>> + my $directory = $info->{'archive-directory'}
>>>>> + or die "did not get path to archive directory from backup provider\n";
>>>>> + die "not a directory '$directory'" if !-d $directory;
>>>>> +
>>>>> + my $rsync = ['rsync', '--stats', '-h', '-X', '-A', '--numeric-ids', '-aH', '--delete',
>>>>> + '--no-whole-file', '--sparse', '--one-file-system', '--relative'];
>>>>> + push $rsync->@*, '--bwlimit', $bwlimit if $bwlimit;
>>>>> + push $rsync->@*, "${directory}/./", $rootdir;
>>>>
>>>> and this as well?
>>>>
>>>
>>> Good catch, will fix!
>>>
>>
>> Hmm, then rsync won't be able to access the source (for my Borg example)
>> anymore :/
>>
>> WARN: rsync: [sender] change_dir
>> "/run/pve-storage-borg-plugin/pve-lxc-111-2024-08-13T09:34:25Z.restore-container/filesystem"
>> failed: Permission denied (13)
>>
>> Wit restore_tar_archive we stream the contents via stdin, can't do that
>> here. But maybe some kind of bind mount to make it accessible?
>
> or rsync-on-host piped to rsync-in-ns ? haven't tried though
Would that require setting up an rsync daemon process? Or how would you
achieve the split? The man page says that --server/sender should not be
used:
> INTERNAL OPTIONS
> The options --server and --sender are used internally by rsync, and should never be typed by a user under normal circumstances. Some awareness of these options may be needed in certain sce‐
> narios, such as when setting up a login that can only run an rsync command. For instance, the support directory of the rsync distribution has an example script named rrsync (for restricted
> rsync) that can be used with a restricted ssh login.
More information about the pve-devel
mailing list