Transferring Files To and From the Windows BMR Environment
EnterpriseBacula Enterprise Only
This solution is only available for Bacula Enterprise. For subscription inquiries, please reach out to sales@baculasystems.com.
If you need to transfer files to or from the WindowsBMR environment, you can use:
A USB stick
FTP
SCP (ssh copy)
mount a network share using command “net use”
USB Stick
You can use the command below to display all connected drives and identify your USB key:
echo list volume | diskpart
Use the command “xcopy” to copy a directory recursively :
X:\Bacula\rescue\restore>xcopy temp h:\ /e
FTP
Here is a sample of using FTP to upload and download a file.
X:\Bacula\rescue\restore>ftp ftp.yourserver.net
Connected to ftp.yourserver.net.
220-Bienvenue,
User (ftp.yourserver.net:(none)): bacula
331 User bacula OK. Password required
Password: *********
230-User bacula has group access to: users
230 OK. Current restricted directory is /
ftp> put temp\logs\stderr.log
200 PORT command successful
150 Connecting to port 49204
226-File successfully transferred
226 0.420 seconds (measured here), 186.14 Kbytes per second
ftp: 81855 bytes sent in 0.31Seconds 262.36Kbytes/sec.
ftp> get stderr.log
200 PORT command successful
150-Connecting to port 49205
150 78.1 kbytes to download
226-File successfully transferred
226 0.047 seconds (measured here), 1.67 Mbytes per second
ftp: 81852 bytes received in 0.08Seconds 1049.38Kbytes/sec.
ftp> quit
221-Goodbye. You uploaded 79 and downloaded 80 kbytes.
221 Logout.
SCP
More secure (and probably more common than ftp, today) is scp, a
command that uses the SSH protocol. Since most Linux systems run the SSH
daemon, it is easy to transfer a file using SCP.
X:\Bacula\rescue\restore>pscp temp\logs\stderr.log root@max:/tmp
The server's host key is not cached in the registry. You
have no guarantee that the server is the computer you
think it is.
The server's rsa2 key fingerprint is:
ssh-rsa 2048 46:75:4c:4b:41:b9:57:c2:d9:58:8b:1d:62:1a:54:18
If you trust this host, enter "y" to add the key to
PuTTY's cache and carry on connecting.
If you want to carry on connecting just once, without
adding the key to the cache, enter "n".
If you do not trust this host, press Return to abandon the
connection.
Store key in cache? (y/n) y
root@max's password:******
To download a file just swap the arguments:
X:\Bacula\rescue\restore> pscp root@max:/tmp/stderr.log .
Network Share
To mount a network share use the command “net use”. This command is very capricious, if you have a problem, try to qualify / unqualify / tune the various options it supports.
X:\Bacula\rescue\restore> net use U: \\192.168.1.10\C$ /user:Administrator password
C$ is the administration share of drive C:, all drives have an administration share.
You can also use a share Name, if the windows host exports any.
“Administrator” is the local Administrator, use “DOMAINNAMEAdministrator” for the domain admin. You can also use any other local or domain user with the correct password: “HOSTNAMEusername”. The administrator account name is localized, so it may be different for different localizations of Windows.
Please take care to use the correct combination of username and password to get write access to the network share.
Instead of the IP address you can also try to use the DNS or netbios name.
net use V: \\myserver.domain.com\myshare /user:LOCALCPU\LOCALUSER password
net use W: \\myserver\myshare /user:DOMAINNAME\DOMAINUSER password
Use the command xcopy to copy a directory recursively, for example:
X:\Bacula\rescue\restore>xcopy temp h:\ /e
See also
Previous articles:
Next articles:
Go back to: Windows BMR: Troubleshooting.