It is currently Sun Nov 01, 2020 3:14 am
All times are UTC + 8 hours

Backing up Linux system

Got a question about our NAS utilities? The answer lies within.

Backing up Linux system

Postby mellow » Mon Jun 08, 2020 4:26 am

I bought an Asustor AS1002T v2 for creating backups of several Linux machines. I am confused on how to proceed. Ideally, I would use rsync to create backups over ssh but it seems that only administrator users can connect through ssh. I have created separate users for family members and I am not willing to make everyone an administrator. Additionally, I don't want to run rsyncd on every machine. Is there any way to make this work or did I buy the wrong product? Thanks!
mellow
 
Posts: 2
Joined: Mon Jun 08, 2020 4:16 am

Re: Backing up Linux system

Postby orion » Mon Jun 08, 2020 10:25 am

There are many ways to achieve it. If I were you, I'll make "mount -t cifs" (i.e., mount.cifs) ready on every Linux machine. Each user can then mount his/her own shared folders. (i.e., setup their own shared folder for each user on NAS)
User avatar
orion
 
Posts: 2760
Joined: Wed May 29, 2013 11:09 am

Re: Backing up Linux system

Postby mellow » Tue Jun 09, 2020 6:59 pm

Thanks, I guess the best way is, as you suggested, mounting the shared folders and then running rsync. There is just one problem with this kind of a backup strategy that I can think of: Ideally, the backups would offer protection from buggy scripts or misplaced "rm -rf" calls. There have been some examples of scripts accidentally deleting everything on the computer. What I am worried about is that if the shared folder is mounted on the machine, it would be wiped in that kind of a situation. Although unlikely, this is one reason to have backups.
mellow
 
Posts: 2
Joined: Mon Jun 08, 2020 4:16 am

Re: Backing up Linux system

Postby orion » Wed Jun 10, 2020 10:02 am

That's normal (rm -rf). You can setup access rights on the shared folders (or ACL for different directories).
The other choice is that you can enable network recycle bin in NAS. The function will move deleted files to the bin.
User avatar
orion
 
Posts: 2760
Joined: Wed May 29, 2013 11:09 am

Re: Backing up Linux system

Postby nlinpen » Sat Sep 19, 2020 11:20 pm

After buying an Asustor NAS am I now trying to create a backup of my Ubuntu computer. However, I run unfortunately into some problems. Creating a shared folder on the NAS and mounting this shared folder on the Ubuntu machine is done. Running an initial backup to the NAS is also done and worked. However, running incremental backups is failing in my case.
What tools or software are you running on your Ubuntu machine to run a scheduled incremental backup to the NAS?
nlinpen
 
Posts: 11
Joined: Sat Sep 19, 2020 10:05 am

Re: Backing up Linux system

Postby orion » Mon Sep 21, 2020 10:31 am

Did you try rsync?
User avatar
orion
 
Posts: 2760
Joined: Wed May 29, 2013 11:09 am

Re: Backing up Linux system

Postby jdnz » Wed Sep 30, 2020 1:36 am

orion wrote:Did you try rsync?


rsync is definitely the way to go - you only need rsyncd running on the NAS itself, the clients will just use rsync (the client side) to push backups to the server (generally via cron).

If you use rsync over ssh tranfer speed will be a bit low (due to the cpu overhead of encryption each end) - you can use the non-encrypted direct transport instead which will get close to line speed but that does mean using the rsync.secrets files for authentication which is a security risk.

One thing to be aware of is the stock rsyncd in ADM doesn't seem to honour username/group mapping - files end up with root ownership (which would be an issue at the NAS end for non-admin users). If you look in the ADM rsync.conf you'll see they have an explicit uid/gid mapping in the global section, but even with that removed the ADM rsyncd doesn't want to play nice for mapping - I ended up instead using the entware rsyncd which works as expected.

Make sure you have a good read of the rsync docs on samba.org
jdnz
 
Posts: 1
Joined: Wed Sep 30, 2020 1:24 am

Re: Backing up Linux system

Postby nlinpen » Mon Oct 05, 2020 4:12 pm

nlinpen wrote:After buying an Asustor NAS am I now trying to create a backup of my Ubuntu computer. However, I run unfortunately into some problems. Creating a shared folder on the NAS and mounting this shared folder on the Ubuntu machine is done. Running an initial backup to the NAS is also done and worked. However, running incremental backups is failing in my case.
What tools or software are you running on your Ubuntu machine to run a scheduled incremental backup to the NAS?

I solved this by using luckyBackup on my Ubuntu computer. It has created a cron job, with a setting such that all files will be backed up to the NAS at 5 minutes after booting the Ubuntu computer.
nlinpen
 
Posts: 11
Joined: Sat Sep 19, 2020 10:05 am

Return to NAS Utilities

  • You cannot post new topics in this forum
    You cannot reply to topics in this forum
    You cannot edit your posts in this forum
    You cannot delete your posts in this forum
    You cannot post attachments in this forum
  • Who is online

    Users browsing this forum: No registered users and 2 guests