Hi Ian,

Look at
https://docs.ansible.com/ansible/latest/collections/ansible/posix/synchronize_module.html

This incorporates raync and may well do what you need to do substantially
faster.

Cheers

When in trouble, or in doubt
Run in circles, scream and shout

On Sat, 30 July 2022, 8:14 pm Ian Hobson, <[email protected]> wrote:

> Hi Guys,
>
> I need advice on speeding up this task:
>
> - name: "restore files to {{ location }}"
>    ansible.builtin.copy:
>      src:  "/home/ian/backup/hobson42/var/www/ianhobson.com/"
>      dest: "{{ location }}"
>
> It copies 5022 files, totalling 109.2Mb, and even though both machines
> have NVME SSDs and the network is quiet,
> the task takes over 30 minutes! Note - some of the files are owned by
> root, and have "600" permissions, which need to be preserved.
>
> How do I go about this in a secure way?
>
> I was thinking of setting up passwordless keyfile access for root, and
> then using command: sudo rsync, delegated to localhost, and tearing root
> access down again afterwards. How would I do this using Ansible?
>
> Ideas and advice welcome.
>
> Ian
>
> --
> Ian Hobson
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/bc6e08f4-58e5-64ac-fc0a-a9fd98d546b9%40gmail.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CA%2B8iFp7e2JzL1EH1VAK6O_%3Dc-0%2BNBe_OKUV8TDhxCPP3LyDC8w%40mail.gmail.com.

Reply via email to