How to configure remote partitions

Prev Next

Use the orbit partition command to list, add, or remove remote partitions used to forward database backup, session files, and information encrypted with the master key.

mt4adm@vmdf-giskard:~$ sudo orbit partition --help
Usage: orbit partition

File system partitions management tools

Flags:
       --help Show context-sensitive help.

   -l, --local="/srv/backup_remoto" Local path to mount point
   -h, --remote-host=STRING Remote host address
   -r, --remote-path=STRING Remote path to mount
       --type="cifs" The filesystem type: [nfs|cifs]
   -o, --options=STRING Additional options to mount
   -u, --user=STRING Samba credentials username
   -p, --password=STRING Samba credentials password
   -d, --domain=STRING Samba credentials domain
       --remount Remount the local partition
       --umount Unmount the partition configuration
       --delete Unmount and delete the partition configuration
       --force Force the command execution, never prompt
       --show

When an orbit partition operation is refused or fails, the command shows the reason and ends with a non-zero exit code, so scripts and the Orbit backup settings can detect the failure.

To view the current partition, use orbit partition --show. It displays the disk usage of the mounted file systems and the remote partition entry in the /etc/fstab file.

Adding a CIFS remote partition

To interact with the CIFS protocol and its mounting options in the Linux environment, the Debian cifs-utils package is used in Segura™. This package is maintained by the SAMBA developers. For detailed information about available mounting options, see the official cifs-utils manual.

The --remote-path argument must start with the slash and contain only the destination directory.

mt4adm@vmdf-giskard:~$ sudo orbit partition
   --local="/srv/backup_remoto"
   --remote-host="192.168.214.37"
   --remote-path="/backup"
   --type="cifs"
   --user="safe password"
   --password="@qwemaster88"
   --domain="sandbox.local"
  
Are you sure you want to proceed: y
Done!
No errors reported

Adding an NFS remote partition

To mount an NFS share, set --type="nfs". NFS does not use the Samba credential options (--user, --password, and --domain).

mt4adm@vmdf-giskard:~$ sudo orbit partition
   --local="/srv/backup_remoto"
   --remote-host="192.168.214.40"
   --remote-path="/backup"
   --type="nfs"

Change a mounted remote partition

To change the password, the protocol, or the destination of a remote partition that is already mounted, run orbit partition with the new values, as in the preceding CIFS and NFS examples. The command keeps the current configuration, unmounts the current partition, applies the new configuration, and mounts the new partition.

If the new partition cannot be mounted, for example because of a wrong password or an unreachable host, the command restores the previous configuration, mounts the previous partition again, and ends with an error:

orbit: error: Failed to mount partition: … mount error(13): Permission denied … The previous configuration was restored and its partition mounted again.

If the previous partition also cannot be mounted again, for example because its password was changed on the file server, the message ends with The previous configuration was restored, but its partition could not be mounted again: …. In this case, the backup stops copying until a partition is mounted. Fix the configuration and run the command again.

A password can contain special characters such as /, &, \, and quotation marks. The command stores the password exactly as you type it.

Remount a registered remote partition

Use the orbit partition --remount command when the remote partition returns an error because the destination server was unreachable. If the partition does not respond, for example after the shared folder was deleted and created again on the file server (Stale file handle), the command unmounts the partition and mounts it again. It reports success only when the partition responds again.

To update the credentials of a CIFS partition, add --user, --password, or --domain to the --remount command. The new values replace the stored credentials before the partition is mounted again.

mt4adm@vmdf-giskard:~$ sudo orbit partition --remount
Are you sure you want to proceed: y
Partition remounted successfully
- domain=sandbox.local
mount.cifs kernel mount options: ip=192.168.214.37,
unc=\\192.168.214.37\backup,file_mode=0750,dir_mode=0750,
uid=1001,gid=1001,user=Segura,domain=sandbox.local,pass=*******

If the file server is still unreachable, the command ends with an error, for example:

orbit: error: Remount failed: … mount error(112): Host is down

Unmount and keep a registered remote partition

To dismount the remote partition while keeping it registered in the /etc/fstab file, use the orbit partition --umount command.

mt4adm@vmdf-giskard:~$ sudo orbit partition --umount
Are you sure you want to proceed: y
Done!
No errors reported

To mount the partition again later, use orbit partition --remount.

Unmount and remove a registered remote partition

To unmount the remote partition and remove it from the /etc/fstab file, use the orbit partition --delete command.

mt4adm@vmdf-giskard:~$ sudo orbit partition --delete
Are you sure you want to proceed: y
Done!
No errors reported

After you remove the partition, backups stop copying files and end with the message The remote backup partition is not mounted, until you add a remote partition again. For more information, see How to configure backup.