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

    Trying to automate the backup for a folder in PFSENSE over to a windows share

    Scheduled Pinned Locked Moved General pfSense Questions
    8 Posts 4 Posters 2.3k 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.
    • E
      elcid
      last edited by

      Hello,

      I am trying to come up with a way to backup an entire directory , nightly, over to a windows share.

      so far, it appears I need to use

      1. crontab  - for automated task

      2. create a script ? and use it with NFS or at least smb mount

      NFS client/server is not installed with pfsense and command to install it apt-get is not working either.

      thanks guys.

      1 Reply Last reply Reply Quote 0
      • D
        doktornotor Banned
        last edited by

        How about pulling the directory from Windows via SCP/SFTP instead? (No, you do not install Samba or NFS servers on a firewall, yuck!)

        1 Reply Last reply Reply Quote 0
        • johnpozJ
          johnpoz LAYER 8 Global Moderator
          last edited by

          so you want to backup something on pfsenes to a windows server, or you want to pull data from this windows server onto pfsense?

          what directory on pfsense would need to backed up?  Wouldn't you just need to backup the config?

          But yeah I am with dok, wouldn't have anything to do with samba or nfs on the firewall - why can you not just use scp/sftp to move the data whatever direction.. You can for sure install ssh on windows that will give you scp/sftp

          An intelligent man is sometimes forced to be drunk to spend time with his fools
          If you get confused: Listen to the Music Play
          Please don't Chat/PM me for help, unless mod related
          SG-4860 24.11 | Lab VMs 2.8, 24.11

          1 Reply Last reply Reply Quote 0
          • E
            elcid
            last edited by

            Thanks guys. You both rock!

            I will try that approach. I will install WSCP and transfer from Pfsense to Windows, playing around trying to get the process automated

            I am trying to backup the proxy server logs /var/squid/logs

            1 Reply Last reply Reply Quote 0
            • E
              elcid
              last edited by

              Hmm. this the file transfer over SCP almost working… but something doesnt seem right.

              I created a user via the GUI and gave it permission to shell in.  < this works.

              however, when attempting to transfer the files, I get a permission denied error.

              In the same GUI, users, I have the new user permission to copy files via SCP.

              Am I missing something?

              I also found this KB, but someone, it doesnt seem right:

              https://doc.pfsense.org/index.php/HOWTO:_Access_pfSense_filesystems_remotely_with_scp

              1 Reply Last reply Reply Quote 0
              • jahonixJ
                jahonix
                last edited by

                @elcid:

                I created a user … I get a permission denied error.

                @https://doc.pfsense.org/index.php/HOWTO:_Access_pfSense_filesystems_remotely_with_scp:

                When connecting with an scp client … the root user must be utilized. The root user has the same password as the admin user but it is not locked into the menu for its shell.

                So why is your just created user not working?
                Answer: …
                A little louder please!  8)

                1 Reply Last reply Reply Quote 0
                • E
                  elcid
                  last edited by

                  @jahonix:

                  @elcid:

                  I created a user … I get a permission denied error.

                  @https://doc.pfsense.org/index.php/HOWTO:_Access_pfSense_filesystems_remotely_with_scp:

                  When connecting with an scp client … the root user must be utilized. The root user has the same password as the admin user but it is not locked into the menu for its shell.

                  So why is your just created user not working?
                  Answer: …
                  A little louder please!  8)

                  Chris, thanks for the reply.  I do understand what you meant that root is required as per the article but…

                  in the GUI, there's an explicit permission to allow a user to copy files via SCP.  I thought this permission alone would take care of it.

                  thanks everyone!!!

                  1 Reply Last reply Reply Quote 0
                  • D
                    doktornotor Banned
                    last edited by

                    The SCP permission works just fine with 2.3.3 and later. Of course if you don't have permissions to the directory or files as that user, you won't be able to download files from there.

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post
                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.