Credentials from command line

Backup agent for Linux servers and workstations on-premises or in the public cloud

Credentials from command line

Veeam Logoby patrickwilson82 » Wed Nov 08, 2017 4:20 pm

Hello,

I am new to veeam, and I am using the free version of Agent for Linux, and I am trying to set a backup from my CentOS server to my NAS. My NAS does require crendentials for access to write to the backup folder. Is there a way to configure these credentials from the command line? Thanks in advance for your help.
patrickwilson82
Enthusiast
 
Posts: 31
Liked: 2 times
Joined: Wed Nov 08, 2017 2:00 pm
Full Name: Patrick Wilson

Re: Credentials from command line

Veeam Logoby PTide » Thu Nov 09, 2017 10:33 am

Hi,

Currently the only way to do so would be to mount NAS to a local directory of your choice, create a repository on that directory, and configure backup to send backups there.

Mount your NAS locally (at this point it will prompt you for password):
Code: Select all
mount.cifs \\\\WINSMB001\\shared /veeam_repo -o user=username


Create veeam repository:
Code: Select all
veeamconfig repository create --name myNAS --location /veeam_repo


Create veeam job:
Code: Select all
veeamconfig job create --name centosBackup --objects /dev/sda --repoName myNAS <other options>


Thanks
PTide
Veeam Software
 
Posts: 3248
Liked: 272 times
Joined: Tue May 19, 2015 1:46 pm

Re: Credentials from command line

Veeam Logoby patrickwilson82 » Thu Nov 09, 2017 4:07 pm

The command I'm using to mount this is "mount.cifs //myNASip/mnt/data/veeam /var/backup -o user=veeam". This prompts me for the password for the user veeam, but then gives me the error "mount error(6): No such device or address". Even though I know that /mnt/data/veeam does exist on my NAS. Am I doing something wrong?
patrickwilson82
Enthusiast
 
Posts: 31
Liked: 2 times
Joined: Wed Nov 08, 2017 2:00 pm
Full Name: Patrick Wilson

Re: Credentials from command line

Veeam Logoby vmniels » Thu Nov 09, 2017 8:09 pm

Can u try username=veeam ?

And can u try to mount that share on maybe another server? Also I notice u do the backup to /var/backup (default dir) - I would suggest making something like /mnt/nasbackup and utilize it (don't use /mnt/backup as we use that for restores).
VCP-DCV
Veeam Certified Architect (VMCA)
http://foonet.be
vmniels
Veeam Software
 
Posts: 1633
Liked: 362 times
Joined: Mon Jul 15, 2013 11:09 am
Full Name: Niels Engelen

Re: Credentials from command line

Veeam Logoby patrickwilson82 » Fri Nov 10, 2017 7:18 pm

I tried exactly what you stated. I tried to mount to /mnt/nasbackup and used username=veeam. Still getting the same error. I tried mounting to a different server and got "no suitable address".
patrickwilson82
Enthusiast
 
Posts: 31
Liked: 2 times
Joined: Wed Nov 08, 2017 2:00 pm
Full Name: Patrick Wilson

Re: Credentials from command line

Veeam Logoby vmniels » Fri Nov 10, 2017 8:25 pm

Are you using dns name or via IP to the share?
VCP-DCV
Veeam Certified Architect (VMCA)
http://foonet.be
vmniels
Veeam Software
 
Posts: 1633
Liked: 362 times
Joined: Mon Jul 15, 2013 11:09 am
Full Name: Niels Engelen

Re: Credentials from command line

Veeam Logoby patrickwilson82 » Mon Nov 13, 2017 1:26 pm

I'm using the DNS name.
patrickwilson82
Enthusiast
 
Posts: 31
Liked: 2 times
Joined: Wed Nov 08, 2017 2:00 pm
Full Name: Patrick Wilson

Re: Credentials from command line

Veeam Logoby PTide » Tue Nov 14, 2017 4:25 pm

Does Veeam Agent mount the share correctly if you do it via UI? If so then you should refer to man mount page as the issue seems to be related to the OS itself, not the Agent.

Thanks
PTide
Veeam Software
 
Posts: 3248
Liked: 272 times
Joined: Tue May 19, 2015 1:46 pm

Re: Credentials from command line

Veeam Logoby patrickwilson82 » Thu Nov 16, 2017 6:01 pm

When I run a normal mount command I'm able to get my /etc/fstab to show 10.0.16.12:/mnt/data/veeam /mnt/nasbackup nfs defaults 0 0. Then when I run veeamconfig job create --name daily_backup --reponame nas_backup --backupallsystem. I get "Error: LvmDriver: Failed to create LVM instance." Any suggestions? I'm not running a GUI on this machine, so I have nothing to compare it to.
patrickwilson82
Enthusiast
 
Posts: 31
Liked: 2 times
Joined: Wed Nov 08, 2017 2:00 pm
Full Name: Patrick Wilson

Re: Credentials from command line

Veeam Logoby vmniels » Thu Nov 16, 2017 6:48 pm

You can run the "veeam" command as it is a commandline GUI which can assist you. I am sure when you configure the job via this it will be easier to troubleshoot.

Did you add the /mnt/nasbackup share as a repository before running the command?
VCP-DCV
Veeam Certified Architect (VMCA)
http://foonet.be
vmniels
Veeam Software
 
Posts: 1633
Liked: 362 times
Joined: Mon Jul 15, 2013 11:09 am
Full Name: Niels Engelen

Re: Credentials from command line

Veeam Logoby patrickwilson82 » Thu Nov 16, 2017 9:32 pm

I don't remember which I did first, but I deleted the repository and re-created it. Still getting the same error. How do I run the UI from the command line?
patrickwilson82
Enthusiast
 
Posts: 31
Liked: 2 times
Joined: Wed Nov 08, 2017 2:00 pm
Full Name: Patrick Wilson

Re: Credentials from command line

Veeam Logoby vmniels » Thu Nov 16, 2017 9:48 pm

Just type/run "veeam" (without the quotes)
VCP-DCV
Veeam Certified Architect (VMCA)
http://foonet.be
vmniels
Veeam Software
 
Posts: 1633
Liked: 362 times
Joined: Mon Jul 15, 2013 11:09 am
Full Name: Niels Engelen

Re: Credentials from command line

Veeam Logoby PTide » Fri Nov 17, 2017 11:29 am

Regarding the error:
"Error: LvmDriver: Failed to create LVM instance."

Please check this thread for resolution.

Thanks
PTide
Veeam Software
 
Posts: 3248
Liked: 272 times
Joined: Tue May 19, 2015 1:46 pm

Re: Credentials from command line

Veeam Logoby patrickwilson82 » Fri Nov 17, 2017 8:32 pm

That other thread answered my question about LVM. It says the backup job is scheduled successfully for tonight, so we'll see what happens! Thank you!
patrickwilson82
Enthusiast
 
Posts: 31
Liked: 2 times
Joined: Wed Nov 08, 2017 2:00 pm
Full Name: Patrick Wilson


Return to Veeam Agent for Linux



Who is online

Users browsing this forum: No registered users and 1 guest