• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

[SOLVED] How to auto download backup file from pfsense to local folder via SCP?

Scheduled Pinned Locked Moved General pfSense Questions
25 Posts 3 Posters 4.8k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    stephenw10 Netgate Administrator
    last edited by Feb 26, 2020, 2:20 AM

    There should be no need to run this in a script. Just get it working from the command line first.

    It looks like your goal here is to run it from pfSense to push the backup to some other box using a cronjob, yes?

    So I'm not sure why you are trying to connect to 192.168.13.10, isn't that where you are running this?

    A 1 Reply Last reply Feb 26, 2020, 2:25 AM Reply Quote 0
    • A
      anonymous01 @stephenw10
      last edited by anonymous01 Feb 26, 2020, 3:24 AM Feb 26, 2020, 2:25 AM

      @stephenw10 said in How to auto download backup file from pfsense to local folder via SCP?:

      oks like your goal here is to run

      Yes it is just to push backup and ideally to use a cronjob to do so.

      However for now, I am tasked to try to push the backup from pfsense to my own pc first....which i created a folder to store it.

      Regarding the connecting to 192.168.13.10 (my ethernet ip) , I am not too sure how to write scp command, that is what i read from other forum. I hv tried multiple combination. And i was wondering how would pfsense know where C:/users/.. are located if i did not specify which ip it is on, better yet which host...smtg like the adress location if u get what i meant

      Again, i just want the backup to push into my local pc. my pfsense is running on a virtual box, my pc is not.

      ssh config and sshd config are all listening to port 22

      Edit: I could ping, putty, winscp, telnet from my pc to pfsense. However, at my pfsense test port, i typed my hostname (pc ip) and port 22. it says connection fail.

      1 Reply Last reply Reply Quote 0
      • S
        stephenw10 Netgate Administrator
        last edited by Feb 26, 2020, 1:26 PM

        Do you have an SSH server running on your local machine? Windows does not run SSH by default.

        The very first part of this is to be able to SSH from the pfSense command line to where ever you plan to sent the config files.

        If you can do that using a password login then move to using SSH key login instead. Then try using scp.

        Steve

        A 1 Reply Last reply Feb 27, 2020, 2:55 AM Reply Quote 0
        • A
          anonymous01 @stephenw10
          last edited by Feb 27, 2020, 2:55 AM

          @stephenw10 okay so you meant that i hv to install OpenSSH and enabled the ssh? Then it should be working?

          So i just need to type the following cmd on pfsense?
          scp - r root@fwip:/cf/conf/backup user@localip:C:\path\to\store\bckup

          Or

          scp - r /cf/conf/backup user@localip:C:\path\to\store\bckup

          1 Reply Last reply Reply Quote 0
          • A
            anonymous01
            last edited by Feb 27, 2020, 10:27 AM

            Thank you everyone for assisting

            I wrote another script on powershell which works for me, will post when it is fully functional with other additional features.

            1 Reply Last reply Reply Quote 0
            25 out of 25
            • First post
              25/25
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
              This community forum collects and processes your personal information.
              consent.not_received