[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2123
  • Last Modified:

Rsync to backup to NAS (NSLU2)

Hi,

I have an OpenSUSE 10.3 server and wish to periodically backup files in my home directory to a Cisco NSLU2 NAS in an incremental "copy only what has changed" fashion. The only way I know how to do this is to connect to the remote NAS via SSH - however the NSLU2 does not have an ssh daemon.

Is there any way I would go about hacking the device to be able to use cron to automatically backup files to the NAS via the local network?

Cheers
0
subz0r69z0r
Asked:
subz0r69z0r
  • 3
  • 2
1 Solution
 
robocatCommented:

First, mount a share from the NAS on your server

mount -t smbfs //nasname/sharename /mnt/somedirectory

Then perform a local rsync between home directory and the mounted  directory on the nas.

rsync [rsync options here] /home/someuser /mnt/somedirectory/backup

0
 
subz0r69z0rAuthor Commented:
Hi Robocat,

That works well - thanks!

Will this make the mapping permanent, or will it not survive the reboot? Is there an entry I need to add to fstab?

Cheers
0
 
subz0r69z0rAuthor Commented:
Forgot to mention that it appears that smbfs is depreciated, I had to use cifs. I also used a credential file that I placed in /etc/smb.secret.
0
 
robocatCommented:

You could put the mount in fstab if you want to make it permanent

or make a script:

mount -t cifs ...
rsync ...
umount ...

This way you don't spend any server/nas resources when a backup is not taking place
0
 
subz0r69z0rAuthor Commented:
cheers
0

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now