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



  • 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.


  • Banned

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


  • LAYER 8 Global Moderator

    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



  • 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



  • 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



  • @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)



  • @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!!!


  • Banned

    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.


Log in to reply