Backing up Linux system

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

Moderator: Lillian.W@AST

Post Reply
mellow
Posts: 4
youtube meble na wymiar Warszawa
Joined: Mon Jun 08, 2020 4:16 am

Backing up Linux system

Post by mellow »

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!
User avatar
orion
Posts: 3482
Joined: Wed May 29, 2013 11:09 am

Re: Backing up Linux system

Post by orion »

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)
mellow
Posts: 4
Joined: Mon Jun 08, 2020 4:16 am

Re: Backing up Linux system

Post by mellow »

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.
User avatar
orion
Posts: 3482
Joined: Wed May 29, 2013 11:09 am

Re: Backing up Linux system

Post by orion »

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.
nlinpen
Posts: 11
Joined: Sat Sep 19, 2020 10:05 am

Re: Backing up Linux system

Post by nlinpen »

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?
User avatar
orion
Posts: 3482
Joined: Wed May 29, 2013 11:09 am

Re: Backing up Linux system

Post by orion »

Did you try rsync?
jdnz
Posts: 1
Joined: Wed Sep 30, 2020 1:24 am

Re: Backing up Linux system

Post by jdnz »

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
nlinpen
Posts: 11
Joined: Sat Sep 19, 2020 10:05 am

Re: Backing up Linux system

Post by nlinpen »

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.
Post Reply

Return to “NAS Utilities”