20.04 - 备份未运行,"Storage location not available" using samba server as target

分享于 

4分钟阅读

ubuntu

  繁體

问题:

来自testparm -s的输出





 Load smb config files from /etc/samba/smb.conf


Loaded services file OK.


Server role: ROLE_STANDALONE



# Global parameters


[global]


 log file = /var/log/samba/log.%m


 logging = file


 map to guest = Bad User


 max log size = 1000


 obey pam restrictions = Yes


 pam password change = Yes


 panic action = /usr/share/samba/panic-action %d


 passwd chat = *Entersnews*spassword:* %nn *Retypesnews*spassword:* %nn *passwordsupdatedssuccessfully* .


 passwd program = /usr/bin/passwd %u


 server role = standalone server


 server string = %h server (Samba, Ubuntu)


 unix password sync = Yes


 usershare allow guests = Yes


 idmap config * : backend = tdb



[printers]


 browseable = No


 comment = All Printers


 create mask = 0700


 path = /var/spool/samba


 printable = Yes



[print$]


 comment = Printer Drivers


 path = /var/lib/samba/printers




来自:net usershare info --long的输出


[plex]


path=/home/samba/plex


comment=


usershare_acl=Everyone:F,


guest_ok=y




备份源主机上fstab的内容:


 


UUID=ee47a6bd-e854-4389-82f5-e806b8990cee / ext4 defaults 0 0


/swap.img none swap sw 0 0


UUID=AE2E15562E151943 /media/plexfiles ntfs defaults,nls=utf8,umask=000,uid=>



#mount remote plex backup share


//192.168.0.114/plex /mnt/sharemount/ cifs 0 0




***我已经在">挂载remote..."下更新了fstab,因为上面的"rw,samba,用户名=samba,密码=>=>="是正确的,仍然没有按预期挂载,


答案1:

首先,它取决于你如何映射要备份的共享,fstab中创建一个条目,用于永久挂载,可以执行以下操作:


# Example Comment on the Mount:


//192.168.0.121/myshare /mnt/sharemount/ nfs 0 0



然后,这取决于你如何备份。如果您使用的是内置备份,请将目标位置设置为已安装的位置,并且它应该"可以正常工作"。

从服务器上的终端中,如果运行以下命令:


sudo mount -t nfs 10.x.y.z:/share /mnt/path -v



-v将给详细的输出,让你知道发生了什么,例如,在成功挂载时得到以下输出:


mount.nfs: timeout set for Tue Jun 30 22:19:16 2020


mount.nfs: trying text-based options 'vers=4.2,addr=192.168.0.121,clientaddr=192.168.0.116'



对于Samba共享,请尝试以下命令:


mount -t cifs IP_Address:/sharename /mountpoint -o username=userid,workgroup=workgroupname



或者将它放入你的fstab路径:


# sudo nano etc/fstab



//10.x.y.z/share_file /mount/pount cifs rw,user,username=$username,password=$password 0 0



答案2:

fstab的内容如下:


//192.168.0.114/plex /mnt/sharemount/ cifs guest,nounix,dir_mode=0777,file_mode=0666 0 0





Server  LOC  sam  备份  本地  TAR