Backup¶
Introduction¶
This page describes how to connect and backup your ScienceCloud data to a NAS device, for example the UZH NAS service. (NAS stands for Network Attached Storage.)
You can use cifs-utils
to connect and mount a NAS and then explore the file system and download or upload files to ScienceCloud file system.
Install cifs-utils
¶
-
On Ubuntu and Debian run:
sudo apt install cifs-utils
-
On CentOS run:
sudo yum install cifs-utils
Mount the share¶
Create a directory (named smbdir
in this example) to serve as the mount point for the network share:
sudo mkdir /mnt/smbdir
Mount the share with read/write permissions:
sudo mount -t cifs -o rw,user=<uzh_username>,uid=<instance_username> //<nas_address> /mnt/smbdir
where
<uzh_username>
is your UZH shortname that has access to the share<instance_username>
is the username of your local instance (e.g.,ubuntu
on an Ubuntu instance)<nas_address>
is the network address of the NAS share
When you run this command, you will be prompted for the password associated with your UZH username. After entering the correct password, the share will be accessible at /mnt/smbdir
.
If you encounter a cannot resolve hostname
error, follow the solution below.
To set up automatic mounting of your NAS, see the step-by-step guide.
Unmount the share¶
sudo umount /mnt/smbdir
Resolve NAS hostname¶
When mounting UZH NAS storage, you may encounter the following error:
mount error: could not resolve address for <nas_address>: Unknown error
Resolve the NAS share’s hostname to an IP address or canonical name using:
nslookup <nas_address>
When running this command, ensure:
- to not include the share name in this command,
- to run this command from your local computer while connected to the UZH network.
Once you have the IP address or canonical hostname (typically in the format idnasXX.uzh.ch
), mount the share using either:
sudo mount -t cifs -o rw,user=<uzh_username>,uid=<instance_username> //<IP_address>/<share_name>$ /mnt/smbdir
sudo mount -t cifs -o rw,user=<uzh_username>,uid=<instance_username> //idnasXX.uzh.ch/<share_name>$ /mnt/smbdir