-
|
Just started using rustic for personal backups, and finishing my first backup over SFTP. One worry I have is that I'm trying to back up files from two drives:
I've created a config file with [repository]
repository = "opendal:sftp"
# options = { ... }
[backup]
skip-if-unchanged = true
[[backup.snapshots]]
sources = [
"/Users/me/.config",
"/Users/me/Documents",
"/Users/me/Downloads",
"/Users/me/Pictures"
]
[[backup.snapshots]]
sources = [
"/Volumes/MyDrive/Movies",
"/Volumes/MyDrive/Music",
"/Volumes/MyDrive/Photos"
]Ideally, I'd like to be able to to backup local files even when my secondary drive is not mounted (i.e. A quick test with a local repository shows that I might get some errors when running But paths which are present are backed up correctly. So it looks like this works fine, as long as the paths are fully missing (rather than resolving to empty directories). It's just maybe a bit distracting to have to parse the error(s) and check if the issue is just "yeah sure, i haven't mounted that drive, i'm okay with that" or if something else went wrong. Anyone has experience with a similar setup? Anything I could do better? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
I guess one option would be to create two profiles that both push to the same repository. # ~/.config/rustic/sftp-repo.yml
[repository]
repository = "opendal:sftp"
# options = { ... }
[backup]
skip-if-unchanged = true# ~/.config/rustic/local-files.yml
[global]
use-profiles = ["sftp-repo"]
[[backup.snapshots]]
sources = [
"/Users/me/.config",
"/Users/me/Documents",
"/Users/me/Downloads",
"/Users/me/Pictures"
]# ~/.config/rustic/my-drive.yml
[global]
use-profiles = ["sftp-repo"]
[[backup.snapshots]]
sources = [
"/Volumes/MyDrive/Movies",
"/Volumes/MyDrive/Music",
"/Volumes/MyDrive/Photos"
]And then I can do |
Beta Was this translation helpful? Give feedback.
-
|
Looks like re-running I think that'll be good enough for my use case. If anyone knows a different method, feel free to chime in. |
Beta Was this translation helpful? Give feedback.
Looks like re-running
rustic backupwhile my external SSD drive is not plugged in does print a “Not all snapshots were generated successfully!” error, but does not create empty or corrupted snapshots. Runningrustic checkshows no issues.I think that'll be good enough for my use case. If anyone knows a different method, feel free to chime in.