NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
bart_stevens
Nov 27, 2013Aspirant
BackupPC working on ReadyNAS 2100
got finally backuppc working on Readynas 2100 ... (and installed in the mean time an extra perl + apache2 with mod_perl) I was also able to get it work on a NV+ ... but that was a bit too slow thi...
bart_stevens
Jan 18, 2014Aspirant
hmmm people are viewing this post, but no reactions ... don't think this is a good sign ;-)
anyway ... this is how I backup multiple user accounts on a mac mini with backuppc using tar over ssh.
For sure there will be improvements possible!
Setup: Mac mini ip address 192.168.2.238 with multiple users like admin, bart, …
! before you start, go in your mac his/hers system preferences -> sharing -> activate external logins for all users. otherwise you get ‚ssh: connect to host 192.168.2.238 port 22: Connection refused’ !
on client (macmini in this case)
log in as the user that you want to backup (in this example 'admin'), type in a clean terminal window :
(if the .ssh dir doesn’t exist)
-> Mac-mini-van-admin:~ admin$ mkdir ~/.ssh
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/admin/.ssh/id_rsa):
-> hit 3 times enter (= empty passphrase)
->
Your identification has been saved in /Users/admin/.ssh/id_rsa.
Your public key has been saved in /Users/admin/.ssh/id_rsa.pub.
…
to recognize which file belongs to who, I use a combination from the hardware and the user: macmini_admin_id_rsa
on server
open a new terminal window and type:
Are you sure you want to continue connecting (yes/no)? yes
…
backuppc@192.168.3.101's password:
-> type the requested password
Enter file in which to save the key (/home/backuppc/.ssh/id_rsa):
-> hit 3 times enter (= empty passphrase)
to recognize the pub file belongs to the readynas:
on client
copy the public key from the NAS by means of a secure copy (scp)
check if copy went ok
add the NAS key to the authorized keys:
on server
do the same as on the client, my client has ip address 192.168.2.238, user admin
check if copy went ok
add the client with this user login to the known hosts
check if it ssh working:
goal is that you don’t have to type a password and that you immediately see your login name ‚admin’ in this case.
if you need to type your password, try verbose logging with the -v option
If you need to add additional users on the same computer a shorter version is applicable:
on client
login as that user (or by means of su)
to recognize which file belongs to who
copy the public key from the NAS by means of a secure copy (scp)
on server
in the next path the user admin should be replaced on 3 spots!!
check:
If this is done, the hard part is over. The only thing that’s left is the configuration of the client in the backuppc admin interface (of config file)
-> configuring backuppc for mac clients copying over tar:
Xfermethod = tar
Tarsharename = -> insert the tar share: / (just the basic root slash)
BackupFilesOnly
-> add a new key: /
-> insert the path: /Users/admin
in the same way you can exclude directories with BackupFilesExclude: Key is the tar share = / -> Insert the did you want to exclude like ‚/Users/admin/Library/Caches/Metadata/Safari/History/‚
tarclientpath: /usr/bin/tar
tarclientcmd: $sshPath -q -x -l admin $host $tarPath -c -v -f - -C $shareName+ --totals
-> I used the user his name explicitly in the tarclientcmd ...
anyway ... this is how I backup multiple user accounts on a mac mini with backuppc using tar over ssh.
For sure there will be improvements possible!
Setup: Mac mini ip address 192.168.2.238 with multiple users like admin, bart, …
! before you start, go in your mac his/hers system preferences -> sharing -> activate external logins for all users. otherwise you get ‚ssh: connect to host 192.168.2.238 port 22: Connection refused’ !
on client (macmini in this case)
log in as the user that you want to backup (in this example 'admin'), type in a clean terminal window :
(if the .ssh dir doesn’t exist)
-> Mac-mini-van-admin:~ admin$ mkdir ~/.ssh
Mac-mini-van-admin:~ admin$ cd ~/.ssh->
Mac-mini-van-admin:~ admin$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/admin/.ssh/id_rsa):
-> hit 3 times enter (= empty passphrase)
->
Your identification has been saved in /Users/admin/.ssh/id_rsa.
Your public key has been saved in /Users/admin/.ssh/id_rsa.pub.
…
to recognize which file belongs to who, I use a combination from the hardware and the user: macmini_admin_id_rsa
Mac-mini-van-admin:.ssh admin$ cp ./id_rsa.pub ./macmini_admin_id_rsa.pub
on server
open a new terminal window and type:
Mac-mini-van-admin:~ admin$ ssh backuppc@192.168.3.101…
Are you sure you want to continue connecting (yes/no)? yes
…
backuppc@192.168.3.101's password:
-> type the requested password
backuppc@nas_zolder:~$ mkdir ~/.ssh…
backuppc@nas_zolder:~$ cd .ssh
backuppc@nas_zolder:~/.ssh$ ssh-keygen -t rsa
Enter file in which to save the key (/home/backuppc/.ssh/id_rsa):
-> hit 3 times enter (= empty passphrase)
to recognize the pub file belongs to the readynas:
Mac-mini-van-admin:.ssh admin$ cp ./id_rsa.pub ./nas_zolder_backuppc_id_rsa.pub
on client
copy the public key from the NAS by means of a secure copy (scp)
Mac-mini-van-admin:.ssh admin$ scp backuppc@192.168.3.101://home/backuppc/.ssh/nas_zolder_backuppc_id_rsa.pub .-> type password
check if copy went ok
Mac-mini-van-admin:.ssh admin$ ls -a -l-> you should see nas_zolder_backuppc_id_rsa.pub
add the NAS key to the authorized keys:
Mac-mini-van-admin:.ssh admin$ cat ./nas_zolder_backuppc_id_rsa.pub >> ~/.ssh/authorized_keys
on server
do the same as on the client, my client has ip address 192.168.2.238, user admin
backuppc@nas_zolder:~/.ssh$ scp admin@192.168.2.238:/Users/admin/.ssh/macmini_admin_id_rsa.pub .-> password
check if copy went ok
backuppc@nas_zolder:~/.ssh$ ls -a -l-> you should see the file ‚macmini_admin_id_rsa.pub’
add the client with this user login to the known hosts
backuppc@nas_zolder:~/.ssh$ touch known_hosts
backuppc@nas_zolder:~/.ssh$ cat ./macmini_admin_id_rsa.pub >> ~/.ssh/known_hosts
check if it ssh working:
backuppc@nas_zolder:~/.ssh$ ssh -l admin 192.168.2.238 whoami
goal is that you don’t have to type a password and that you immediately see your login name ‚admin’ in this case.
if you need to type your password, try verbose logging with the -v option
backuppc@nas_zolder:~/.ssh$ ssh -v -l admin 192.168.2.238 whoami
If you need to add additional users on the same computer a shorter version is applicable:
on client
login as that user (or by means of su)
bash-3.2$ cd ~/.sshif this dir is not existing: mkdir ~/.ssh and than cd ~/.ssh
bash-3.2$ ssh-keygen -t rsa-> hit 3 times enter (= empty passphrase)
to recognize which file belongs to who
bash-3.2$ cp ./id_rsa.pub ./macmini_bart_id_rsa.pub
copy the public key from the NAS by means of a secure copy (scp)
bash-3.2$ scp backuppc@192.168.3.101://home/backuppc/.ssh/nas_zolder_backuppc_id_rsa.pub .-> type password and say that you want to connect.
bash-3.2$ cat ./nas_zolder_backuppc_id_rsa.pub >> ~/.ssh/authorized_keys
on server
in the next path the user admin should be replaced on 3 spots!!
backuppc@nas_zolder:~/.ssh$ scp bart@192.168.2.238:/Users/bart/.ssh/macmini_bart_id_rsa.pub .-> file should come over
backuppc@nas_zolder:~/.ssh$ cat ./macmini_bart_id_rsa.pub >> ~/.ssh/known_hosts
check:
backuppc@nas_zolder:~/.ssh$ ssh -l bart 192.168.2.238 whoamishould give you ‚bart’
If this is done, the hard part is over. The only thing that’s left is the configuration of the client in the backuppc admin interface (of config file)
-> configuring backuppc for mac clients copying over tar:
Xfermethod = tar
Tarsharename = -> insert the tar share: / (just the basic root slash)
BackupFilesOnly
-> add a new key: /
-> insert the path: /Users/admin
in the same way you can exclude directories with BackupFilesExclude: Key is the tar share = / -> Insert the did you want to exclude like ‚/Users/admin/Library/Caches/Metadata/Safari/History/‚
tarclientpath: /usr/bin/tar
tarclientcmd: $sshPath -q -x -l admin $host $tarPath -c -v -f - -C $shareName+ --totals
-> I used the user his name explicitly in the tarclientcmd ...
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!