How can I find all the volumes mounted by Time Machine - macos

I try to find all the volumes mounted by Time Machine.
I found the tmutil destinationinfo which list all Time Machine volumes. If those are mounted I can find the local path by looking at the Mount Point entry.
This works well for external HDD. If a network backup is used, I saw that Time Machine mount another volume (generally named: "Time Machine Backup"), and I'm unable to find a command or some api which list this volume.
So, is a command, api which can list all the volumes which contains Time Machine backups?

tmutil destinationinfo lists the network drives as well. What are you seeing?
$ tmutil destinationinfo
====================================================
Name : TMBackup
Kind : Network
URL : afp://TimeMachine#camel(TimeMachine)._afpovertcp._tcp.local/TMBackup
Mount Point : /Volumes/TMBackup
ID : XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

Related

Can't mount a permanently installed USB flash drive to the mount point of my choosing with Raspian 10

I want my Raspberry Pi 4B, running Raspian 10, to boot up with a permanently-inserted USB flash drive mounted to /srv/www. The flash drive will never be removed. I formatted the flash drive with an ext4 filesystem. I can manually mount the drive to /srv/www and perform normal file operations.
When I add an entry to /etc/fstab like this:
/dev/sda1 /srv/www ext4 0 0
or like this:
UUID=651003ce-5261-4b00-9940-6207625a5334 /srv/www ext4 0 0
the mount does not succeed when the system boots. I've been at this for hours, trying various suggestions for configuring systemd and see a variety of errors in system logs such as "/dev/sda does not contain a filesystem" but fsck tells me it does. Before I go spend more hours, is what I'm trying to do possible and where am I going wrong?
Unable to find a fstab-related solution, I solved the problem by placing these two lines in /etc/rc.local
sleep 5s
mount /dev/sda1 /srv/www

Can I name a VeraCrypt volume on Mac OS?

When Veracrypt 1.23 mounts a volume it is name NO NAME.
Is there a way to give these volumes a name?
I am using the console to create my containers
veracrypt -t -c $LOCATION --encryption=AES --hash=SHA-512 --filesystem=FAT --password=$PASSWORD --size=1G --volume-type=Normal --pim=$PIM --keyfiles=
I tried renaming the volume in /Volumes/NO\ NAME but that just removes the volume from the desktop.
And specifying a mount point.
Enter mount directory [default]: /Users/Test
But the volume still mounts as NO NAME
Using diskutil I can rename volumes, as below.
/usr/sbin/diskutil rename "NO NAME" "TEST2"
I am leaving the question open as this is a bit of a hack.

How to print the failed mount points in unix?

I have different mountpoints with different names in each Unix servers. Here, we need to have one only script to list out the failed mount point and implement the same in all servers.
Expected as below
/dev/mount1 mount point is missing from the host hostname.domain.com
Please do a "mount -v"(verbose mode) on the terminal, if there is a failed mount point then it will also show up in here. Look for the errors.

How to check for usb device with if statement in bash

I'm attempting to create an automated bash script that fills up a file with urandom in the unit's flash storage. I can manually use all of the commands to make this happen, but I'm trying to create a script and having difficulty figuring out how to check for the usb device. I know that it will be either sda1 or sdb1, but not sure if the code below is sufficient ...? Thanks! Below, is the code:
if /dev/sda1
then
mount -t vfat /dev/sda1 /media/usbkey
else
mount -t vfat /dev/sdb1 /media/usbkey
fi
The way I script mountable drives is to first put a file on the drive, e.g. "Iamthemountabledrive.txt", then check for the existence of that file. If it isn't there, then I mount the drive. I use this technique to make sure an audio server is mounted for a 5 radio station network, checking every minute in case there is a network interrupt event.
testfile="/dev/usbdrive/Iamthedrive.txt"
if [ -e "$testfile" ]
then
echo "drive is mounted."
fi
You can mount by label or UUID and hence reduce the complexity of your script. For example if your flash storage has label MYLABEL (you can set and display VFAT labels using mtools' mlabel):
$ sudo mount LABEL=MYLABEL /media/usbkey

Finding the path of a mounted network share on Mac OS X

I'd like to find out where a network share is mounted when the mount command fails like this:
$ mkdir ~/share
$ mount_afp afp://server/share ~/share
mount_afp: the volume is already mounted
This looked promising...
$ mount
... snip ...
afp_000000004oMw0q76003DF78u-1.2d000006 on /Volumes/share-1 (afpfs, nodev, nosuid, mounted by username)
afp_000000004oMw0q76003DF78u-2.2d000007 on /Volumes/share-2 (afpfs, nodev, nosuid, mounted by username)
It seems like there should be a way to map those long afp_000... numbers to URIs... Is there any way to determine where a volume is mounted given its afp:// URI?
I'm actually executing these commands with Python's subprocess module, so if there's a module or library that can do it that would be acceptable as well.
Try /Volumes/PUBLIC
(Or whatever Get Info tells you after looking at the file with Finder)
That's what worked for me.
Do you mean where it mounted on the remote server or where its mounted locally? If youre talking on the local system the mountpoint should be in /Network/Servers unless otherwise specified by fstab, autofs or an arg to mount. You could scan /Network/Servers for the share name...

Resources