예제 #1
0
func NewRemoteRedisBackup(sshCfg command.SshConfig) (*RedisBackup, error) {
	lo.G.Debug("setting up a new remote MongoDump Object")
	remoteExecuter, err := command.NewRemoteExecutor(sshCfg)
	return &RedisBackup{
		Caller:    remoteExecuter,
		RemoteOps: osutils.NewRemoteOperations(sshCfg),
	}, err
}
예제 #2
0
파일: mysqldump.go 프로젝트: rdrew4/cfops
func NewRemoteMysqlDump(username, password string, sshCfg command.SshConfig) (*MysqlDump, error) {
	remoteExecuter, err := command.NewRemoteExecutor(sshCfg)
	return &MysqlDump{
		Ip:        "localhost",
		Username:  username,
		Password:  password,
		Caller:    remoteExecuter,
		RemoteOps: osutils.NewRemoteOperations(sshCfg),
	}, err
}
예제 #3
0
func NewRemoteMongoDump(username, password string, sshCfg command.SshConfig) (*MongoDump, error) {
	lo.G.Debug("setting up a new remote MongoDump Object")
	remoteExecuter, err := command.NewRemoteExecutor(sshCfg)
	return &MongoDump{
		IP:        "localhost",
		Username:  username,
		Password:  password,
		Caller:    remoteExecuter,
		RemoteOps: osutils.NewRemoteOperations(sshCfg),
	}, err
}
예제 #4
0
파일: pgdump.go 프로젝트: rdrew4/cfops
func NewPgRemoteDump(port int, database, username, password string, sshCfg command.SshConfig) (*PgDump, error) {
	remoteExecuter, err := command.NewRemoteExecutor(sshCfg)
	return &PgDump{
		sshCfg:    sshCfg,
		Ip:        "localhost",
		Port:      port,
		Database:  database,
		Username:  username,
		Password:  password,
		Caller:    remoteExecuter,
		RemoteOps: osutils.NewRemoteOperations(sshCfg),
	}, err
}
예제 #5
0
파일: nfs.go 프로젝트: gitter-badger/cfops
func NewNFSBackup(password, ip string) (nfs *NFSBackup, err error) {
	config := command.SshConfig{
		Username: NFS_DEFAULT_SSH_USER,
		Password: password,
		Host:     ip,
		Port:     22,
	}
	var remoteExecuter command.Executer

	if remoteExecuter, err = NfsNewRemoteExecuter(config); err == nil {
		nfs = &NFSBackup{
			Caller:    remoteExecuter,
			RemoteOps: osutils.NewRemoteOperations(config),
		}
	}
	return
}
예제 #6
0
파일: nfs.go 프로젝트: kevball/cfops
//NewNFSBackup - constructor for an nfsbackup object
func NewNFSBackup(password, ip string, sslKey string) (nfs *NFSBackup, err error) {
	config := command.SshConfig{
		Username: NfsDefaultSSHUser,
		Password: password,
		Host:     ip,
		Port:     22,
		SSLKey:   sslKey,
	}
	var remoteExecuter command.Executer

	if remoteExecuter, err = NfsNewRemoteExecuter(config); err == nil {
		nfs = &NFSBackup{
			Caller:    remoteExecuter,
			RemoteOps: osutils.NewRemoteOperations(config),
		}
	}
	return
}