Module: Snapsync

Defined in:
lib/snapsync.rb,
lib/snapsync/cli.rb,
lib/snapsync/sync.rb,
lib/snapsync/test.rb,
lib/snapsync/btrfs.rb,
lib/snapsync/cleanup.rb,
lib/snapsync/version.rb,
lib/snapsync/snapshot.rb,
lib/snapsync/sync_all.rb,
lib/snapsync/ssh_popen.rb,
lib/snapsync/exceptions.rb,
lib/snapsync/tasks/Task.rb,
lib/snapsync/sync_target.rb,
lib/snapsync/Notification.rb,
lib/snapsync/ssh_popen_exe.rb,
lib/snapsync/snapper_config.rb,
lib/snapsync/tasks/AutoSync.rb,
lib/snapsync/btrfs_subvolume.rb,
lib/snapsync/remote_pathname.rb,
lib/snapsync/sync_last_policy.rb,
lib/snapsync/snapshot_transfer.rb,
lib/snapsync/partitions_monitor.rb,
lib/snapsync/default_sync_policy.rb,
lib/snapsync/timeline_sync_policy.rb

Defined Under Namespace

Modules: SelfTest Classes: AgnosticPath, AutoSync, Btrfs, CLI, Cleanup, DefaultSyncPolicy, InvalidConfiguration, InvalidInfoFile, InvalidPolicy, InvalidSnapshot, LocalPathname, Notification, PartitionsMonitor, RemotePathname, SSHPopen, SSHPopenExe, SnapperConfig, Snapshot, SnapshotTransfer, SubvolumeInfo, SubvolumeMinimalInfo, Sync, SyncAll, SyncLastPolicy, SyncTarget, Task, TimelineSyncPolicy

Constant Summary collapse

VERSION =
"0.5.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

._mountpointCacheHash

Returns:

  • (Hash)


48
49
50
# File 'lib/snapsync/remote_pathname.rb', line 48

def _mountpointCache
  @_mountpointCache
end

.NOTIFYObject

Returns the value of attribute NOTIFY.



108
109
110
# File 'lib/snapsync.rb', line 108

def NOTIFY
  @NOTIFY
end

.SSH_DEBUGObject

Returns the value of attribute SSH_DEBUG.



106
107
108
# File 'lib/snapsync.rb', line 106

def SSH_DEBUG
  @SSH_DEBUG
end

.SYSTEMDObject

Returns the value of attribute SYSTEMD.



107
108
109
# File 'lib/snapsync.rb', line 107

def SYSTEMD
  @SYSTEMD
end

Class Method Details

.path(dir) ⇒ AgnosticPath

Parameters:

  • dir (String)

Returns:



116
117
118
119
120
121
122
123
124
125
126
127
# File 'lib/snapsync.rb', line 116

def self.path(dir)
    raise "Nil dir" if dir.nil?
    if dir.instance_of? RemotePathname or dir.include? ':'
        begin
            RemotePathname.new(dir)
        rescue URI::InvalidComponentError
            LocalPathname.new(dir)
        end
    else
        LocalPathname.new dir
    end
end