Results 1 to 9 of 9

Thread: using SMB for a backup device

  1. #1
    Join Date
    Dec 2008
    Location
    Montana, USA
    Posts
    676

    Default using SMB for a backup device

    I have a DELL computer running Leap 42.3 as a headless NFS server for sharing files between computers in my place. We use it for any data that needs to be shared and/or backed up. All other computers on this network are running Leap 42.3 and can access the Dell server just fine.

    I have a Buffalo server that can only support SMB or FTP, it will not act as an NFS server.

    I want to have all the files from the Dell server backed up to the Buffalo server using a cron job.

    I have looked and see about forty hundred ways to do this, and am relatively sure that most of them require software and settings that would be unnecessary if I wer to properly set this thing up correctly the first time.

    My question is: How can I accomplish what I want to do the correct way, the first time?

    Bart

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,720

    Default Re: using SMB for a backup device

    This is only a side remark, because I do not use anything not Unix/Linux (and thus no SAMBA), but be aware of the fact that when you transfer files over a non Unix/Linux path the ownership (user:group) and permissions belonging to them will most probably get lost. Thus retrieving a file from such a backup storage will (I hope) restore the data, but ownership and permission will be that of the retrieve process and not the original ones.
    Henk van Velden

  3. #3
    Join Date
    Dec 2008
    Location
    Montana, USA
    Posts
    676

    Default Re: using SMB for a backup device

    Yeah... I thought about that, but there's only my wife and I on the system, the data will on our individual computers, copied to individual directories on the NFS server, and then backed up to individual folders on the samba device. The samba device will be a last resort backup and it'll be easy to figure out what the permissions should be should I ever need to recover ant data, so I think it'll work. That's assuming I can get it to work.

    But thanks for the heads up!

    Bart

  4. #4
    Join Date
    Jun 2008
    Location
    Rural Australia
    Posts
    301

    Default Re: using SMB for a backup device

    Quote Originally Posted by hcvv View Post
    This is only a side remark, because I do not use anything not Unix/Linux (and thus no SAMBA), but be aware of the fact that when you transfer files over a non Unix/Linux path the ownership (user:group) and permissions belonging to them will most probably get lost. Thus retrieving a file from such a backup storage will (I hope) restore the data, but ownership and permission will be that of the retrieve process and not the original ones.

    IMHO many of us, particularly not so technical, also wish ensure our transfers are Unix/Linux to Unix/Linux.


    How do we do that ?


    Perhaps a new thread in Network/Internet: UnixLinux to UnixLinux



    .

  5. #5
    Join Date
    Dec 2008
    Location
    Montana, USA
    Posts
    676

    Default Re: using SMB for a backup device

    Quote Originally Posted by paulparker View Post
    IMHO many of us, particularly not so technical, also wish ensure our transfers are Unix/Linux to Unix/Linux.


    How do we do that ?


    Perhaps a new thread in Network/Internet: UnixLinux to UnixLinux



    .
    Use a Unix/Linux server. NFS makes it easy.

    Bart

  6. #6
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    32,316
    Blog Entries
    15

    Default Re: using SMB for a backup device

    On Thu 15 Feb 2018 09:26:01 PM CST, paulparker wrote:

    hcvv;2855258 Wrote:
    > This is only a side remark, because I do not use anything not
    > Unix/Linux (and thus no SAMBA), but be aware of the fact that when
    > you transfer files over a non Unix/Linux path the ownership
    > (user:group) and permissions belonging to them will most probably get
    > lost. Thus retrieving a file from such a backup storage will (I hope)
    > restore the data, but ownership and permission will be that of the
    > retrieve process and not the original ones.



    IMHO many of us, particularly not so technical, also wish ensure our
    transfers are Unix/Linux to Unix/Linux.


    How do we do that ?


    Perhaps a new thread in Network/Internet: UnixLinux to UnixLinux
    Hi
    If you use something like fwbackups, it just creates a tarball backup,
    so retains all permissions/ownership...

    --
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    openSUSE Leap 42.3|GNOME 3.20.2|4.4.114-42-default
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!


  7. #7
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,720

    Default Re: using SMB for a backup device

    Quote Originally Posted by paulparker View Post
    IMHO many of us, particularly not so technical, also wish ensure our transfers are Unix/Linux to Unix/Linux.


    How do we do that ?


    Perhaps a new thread in Network/Internet: UnixLinux to UnixLinux



    .
    Well, for Linux people that is the normal way of life I should say. Samba is only for those environments that are unable to live without MS Windows. And when you mean with "UnixLinux to UnixLinux" something like "what are the several methods of exchanging data between Unix/Linux systems", the the answers will be multifold (as you can see already above). It depends on the application/situation.

    In the case of: how do I use (parts of) the directory tree of one system on another one (I am not sure, but the MS Windows lingo calls this something like "sharing"), NFS is of course the solution since the 1980s. It requires a common user/group management of the involved system to guarantee that the normal security is available throughout.

    For simply copying files over the network things like (s)ftp come to mind, but these are OS type agnostic and ownership/permission of the new created copy are determined by the system where it is created on (users can be different on server and client).

    For keeping up-to-date copies of files on another place (local or remote) rsync is very powerful. And it keeps ownership/permissions, thus when used remote the user/group management on both systems needs attention.

    And yes, when you use tar to archive a bunch of files, their ownership/permissions can be included in the result and can be restored when unpacked. Such a tar file can of course be transferred to a non-Linux system without changing the contents, and on retrieval to a Linux system can be unpacked there with restored ownership/permissions.

    There will be more of these and all of these can of course be combined to serve the needs of individual situations.
    Henk van Velden

  8. #8
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    13,295
    Blog Entries
    2

    Default Re: using SMB for a backup device

    Not sure what you're asking for...

    But from your description,
    I'd break up your desired solution into 2 tasks...

    1. Backup
    2. Destination remote share using SMB or FTP.

    The base concept to know is that generally speaking, network transfers require a client-side app and a server-side app which are separate and do not really have any dependency on the other.

    So,
    First the backup app.
    If a backup app allows you to place your backups in a remote location using a supported protocol, then fine. A quick search suggest that the popular Deja Dup supports SMB and FTP in the app.
    If not, then typically you can mount a network share as a local location (This is similar to in the Windows world using a Mapped Drive and in Linux is the natural way to set up NFS, but not so with SMB or FTP).
    If you can't find a backup app, then you can use tAR to create your full, incremental or differential backups using a script... and when looking for a usable script, today Github is my friend... for instance the following
    https://gist.github.com/weakish/2585180
    https://gist.github.com/arunk-s/10571807

    Now regarding SMB and FTP...
    Just because your NFS server "only supports NFS," that may be only because you have the NFS server app installed and running.
    That does not preclude you from installing an SMB or FTP <client> to connect to another SMB/FTP <server> like a Buffalo.
    Install the client you need and presto... you'll have network connectivity and potential transfers.

    HTH,
    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  9. #9
    Join Date
    Mar 2015
    Location
    Indianapolis area
    Posts
    35

    Default Re: using SMB for a backup device

    If you just want to dump files, initiate it from the linux server. Make sure you have cifs-utils installed.

    Make a directory for the NAS, (I would unmount it when your not using it to keep the data safe. I use a cronjob.)
    Code:
    sudo mkdir /mnt/nas_backup
    give ownership to the user
    Code:
    sudo chown user:usergroup /mnt/nas_backup
    mount nas share (your on your own for creating this and applying permission on the NAS)
    Code:
    sudo mount -o username=nasuser //nas_IP/share /mnt/nas_backup

    -- you should get a password prompt, you might need to do nasuser@nasname or nasname\\nasuser

    copy files to /mnt/nas_backup
    Code:
    rysnc -arv /home/user /mnt/nas_backup
    -- this will probably give you an error about permissions, but good practice to keep -arv

    unmount nas share
    Code:
    sudo umount /mnt/nas_backup

    protip:
    put an entry like this in your fstab and you can mount with a user account instead of root
    Code:
    //nas_ip/share /mnt/nas_backup cifs noauto,user,rw,vers=3,proto=tcp,nolock,noacl,rw,suid,dev,exec,async 0 0


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •