package backup import "path/filepath" // PrimaryBackupPath returns the root primary backup directory for a drive. func PrimaryBackupPath(drivePath string) string { return filepath.Join(drivePath, "backups", "primary") } // PrimaryResticRepoPath returns the restic repo path on a drive's primary backup. func PrimaryResticRepoPath(drivePath string) string { return filepath.Join(drivePath, "backups", "primary", "restic") } // AppDBDumpPath returns the DB dump directory for an app on its home drive. func AppDBDumpPath(drivePath, stackName string) string { return filepath.Join(drivePath, "backups", "primary", stackName, "db-dumps") } // SecondaryBackupPath returns the root secondary backup directory for a drive. func SecondaryBackupPath(drivePath string) string { return filepath.Join(drivePath, "backups", "secondary") } // AppSecondaryRsyncPath returns the rsync destination for an app's secondary backup. func AppSecondaryRsyncPath(drivePath, stackName string) string { return filepath.Join(drivePath, "backups", "secondary", stackName, "rsync") } // SecondaryResticRepoPath returns the restic repo path on a drive's secondary backup. func SecondaryResticRepoPath(drivePath string) string { return filepath.Join(drivePath, "backups", "secondary", "restic") } // SecondaryInfraPath returns the infrastructure config mirror directory on a drive's secondary backup. func SecondaryInfraPath(drivePath string) string { return filepath.Join(drivePath, "backups", "secondary", "_infra") } // AppDataDir returns the app data directory path on a drive. func AppDataDir(drivePath, stackName string) string { return filepath.Join(drivePath, "appdata", stackName) } // InfraBackupDir returns the hidden infra backup directory on a drive. func InfraBackupDir(mountPath string) string { return filepath.Join(mountPath, ".felhom-infra-backup") }