Standalone backup agents for Linux, Mac, AIX & Solaris workloads on-premises or in the public cloud
Post Reply
patrickwilson82
Enthusiast
Posts: 44
Liked: 2 times
Joined: Nov 08, 2017 2:00 pm
Full Name: Patrick Wilson
Contact:

Credentials from command line

Post by patrickwilson82 »

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.
PTide
Product Manager
Posts: 6551
Liked: 765 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Credentials from command line

Post by PTide »

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
patrickwilson82
Enthusiast
Posts: 44
Liked: 2 times
Joined: Nov 08, 2017 2:00 pm
Full Name: Patrick Wilson
Contact:

Re: Credentials from command line

Post by patrickwilson82 »

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?
nielsengelen
Product Manager
Posts: 5797
Liked: 1215 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:

Re: Credentials from command line

Post by nielsengelen »

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).
Personal blog: https://foonet.be
GitHub: https://github.com/nielsengelen
patrickwilson82
Enthusiast
Posts: 44
Liked: 2 times
Joined: Nov 08, 2017 2:00 pm
Full Name: Patrick Wilson
Contact:

Re: Credentials from command line

Post by patrickwilson82 »

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".
nielsengelen
Product Manager
Posts: 5797
Liked: 1215 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:

Re: Credentials from command line

Post by nielsengelen »

Are you using dns name or via IP to the share?
Personal blog: https://foonet.be
GitHub: https://github.com/nielsengelen
patrickwilson82
Enthusiast
Posts: 44
Liked: 2 times
Joined: Nov 08, 2017 2:00 pm
Full Name: Patrick Wilson
Contact:

Re: Credentials from command line

Post by patrickwilson82 »

I'm using the DNS name.
PTide
Product Manager
Posts: 6551
Liked: 765 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Credentials from command line

Post by PTide »

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
patrickwilson82
Enthusiast
Posts: 44
Liked: 2 times
Joined: Nov 08, 2017 2:00 pm
Full Name: Patrick Wilson
Contact:

Re: Credentials from command line

Post by patrickwilson82 »

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.
nielsengelen
Product Manager
Posts: 5797
Liked: 1215 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:

Re: Credentials from command line

Post by nielsengelen »

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?
Personal blog: https://foonet.be
GitHub: https://github.com/nielsengelen
patrickwilson82
Enthusiast
Posts: 44
Liked: 2 times
Joined: Nov 08, 2017 2:00 pm
Full Name: Patrick Wilson
Contact:

Re: Credentials from command line

Post by patrickwilson82 »

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?
nielsengelen
Product Manager
Posts: 5797
Liked: 1215 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:

Re: Credentials from command line

Post by nielsengelen »

Just type/run "veeam" (without the quotes)
Personal blog: https://foonet.be
GitHub: https://github.com/nielsengelen
PTide
Product Manager
Posts: 6551
Liked: 765 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Credentials from command line

Post by PTide »

Regarding the error:
"Error: LvmDriver: Failed to create LVM instance."
Please check this thread for resolution.

Thanks
patrickwilson82
Enthusiast
Posts: 44
Liked: 2 times
Joined: Nov 08, 2017 2:00 pm
Full Name: Patrick Wilson
Contact:

Re: Credentials from command line

Post by patrickwilson82 »

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!
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests