|
|
#1 |
|
Prospect
Join Date: Mar 2002
Location: Utah
Posts: 9
|
Mounting a remote volume via Terminal
I am want to set up a daily back up of my machine. I plan to do this back up while I am asleep, 2 or 3 in the morning. The problem is the volume I want to back up to is my server.
The question is how do I mount a remote volume via command line. I know how to 'open' the volume using the command line, but it requests my password. Is it even possible to automate a login and logout of a remote volume? The reason I want to know how to do this in command line is because I am using Cron to do the back up. I would appreciate any help that can be given on this subject. |
|
|
|
|
|
#2 |
|
Major Leaguer
Join Date: Dec 2002
Posts: 441
|
There are many possibilities. What's your preferred route: AFP, FTP, NFS, or WebDAV?
|
|
|
|
|
|
#3 |
|
Major Leaguer
Join Date: Jan 2003
Location: Bay Area
Posts: 327
|
You don't really even need to mount the volume if you use rsync over ssh.
The basic command is Code:
rsync -ae ssh /path/to/backup/ server:/path/to/backup/directory/ http://www.gentoo.org/proj/en/keychain.xml which runs perfectly on OS X. Breen |
|
|
|
|
|
#4 |
|
League Commissioner
Join Date: Sep 2003
Location: Tokyo
Posts: 6,334
|
Plenty of unix file utilities like ftp, rsync and curl can read the .netrc file for machine names and passwords. If you don't need encrypted transport it's much easier than fussing with secure keys.
Read http://www.unet.univie.ac.at/aix/fil...iles/netrc.htm for a reasonably friendly description. I use this for cron-scheduled copies with curl (type "man curl" in the terminal for details. Super-handy program for any unattended file movements between machines.) Couple of points: 1. .netrc (starts with a period) must be at the top level of your home directory. 2. must be readable by you and you only (chmod 600) 3. it is invisible to the finder, which can be good or bad depending on your situation. If you like to use graphical tools to edit it, you can still type the full filename in the open dialog. Ignore the warnings when you save it, but make sure that your program doesn't add an extension. 4. Passwords are stored in clear text, you need to decide if that is acceptable or not 5. cron jobs must run as your user, not as system, or the right .netrc will not be found. 6. Each user may have a different file. |
|
|
|
![]() |
|
|