How to modify ssh_args in rsnapshot config?

5,676

Solution 1

The rsnapshot man page seems to imply that you add the per-backup-point arguments as a comma separated list after the destination, the example they give is

backup /var/ localhost/ one_fs=1

This is the same as the other examples, but notice the fourth column. This is how you specify per-backup-point options to over-ride global settings. This extra parameter can take several options, separated by commas.

so I guess you would use

backup /var/ localhost/ ssh_args=-p456

Solution 2

You can also set the port globally for that user inside the corresponding ~/.ssh/config:

Host example.com
Port 1234

That way it'd get picked up everywhere SSH-related and you won't have to manually specify it each time.

Not saying it's a better solution, just an alternative.

Share:
5,676

Related videos on Youtube

Nick
Author by

Nick

Updated on September 18, 2022

Comments

  • Nick
    Nick almost 2 years

    I have a global rsnapshot config file for all machines that we backup. The global file has

    ssh_args -p 123
    

    The machine specific files include the global config file and tries to override the port:

    include_conf    /etc/rsnapshot-common.conf
    ssh_args    -p 456
    

    This does not work, I get the error:

    global ssh_args can only be set once, but is already set. Perhaps you wanted to use a per-backup-point ssh_args instead.

    So it knows what I want to do, but it doesn't tell me how to do it! The man page doesn't mention any way of doing this either. How do I change the port after its been set globally?

  • Nick
    Nick over 11 years
    Thanks! It looks like this is the syntax backup /var/ localhost/ ssh_args=-p456