You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
1.6 KiB
67 lines
1.6 KiB
---
|
|
|
|
Alias: [""]
|
|
Tag: [""]
|
|
Date: 2022-02-13
|
|
DocType: "WebClipping"
|
|
Hierarchy:
|
|
TimeStamp:
|
|
Link: https://gist.github.com/agmm/ea97a3c2b5bf713567aad89672116e12
|
|
location:
|
|
CollapseMetaTable: true
|
|
|
|
---
|
|
|
|
Parent:: [[Obsidian plugins]], [[@IT & Computer]]
|
|
|
|
# How to sync Obsidian Notes on iOS
|
|
|
|
> ⚠️ To prevent data loss make sure you understand how `rclone sync` and `rclone copy` work.
|
|
|
|
1. Download iSH from the AppStore
|
|
|
|
2. Open iSH and install Rclone with the following command:
|
|
|
|
|
|
apk add rclone
|
|
|
|
|
|
3. Create a new remote using
|
|
|
|
rclone config
|
|
|
|
|
|
4. Open your `.profile` file to add the `push` and `pull` commands
|
|
|
|
nano ~/.profile
|
|
|
|
|
|
5. Add the following lines to your profile
|
|
|
|
pull() {
|
|
rclone sync -P "REMOTE\_NAME:NOTES\_PATH" ~/Notes
|
|
}
|
|
|
|
push() {
|
|
rclone copy -P ~/Notes "REMOTE\_NAME:NOTES\_PATH"
|
|
}
|
|
|
|
6. Create a directory to mount your notes on iSH
|
|
|
|
mkdir ~/Notes
|
|
|
|
|
|
7. Mount the Obsidian folder on iOS to the iSH app. After running the following command a file selection dialog will appear, select your local Obsidian vault.
|
|
|
|
mount -t ios . ~/Notes
|
|
|
|
|
|
8. Restart the shell by quitting the iSH app or executing `exit`.
|
|
|
|
9. Run `pull` to sync the notes from your remote machine to the iOS device. Run `push` to upload the files on the iOS device to the remote machine.
|
|
|
|
|
|
Notes
|
|
-----
|
|
|
|
Note that the `pull` command will perform an `rclone sync` action instead of an `rclone copy`. An `rclone sync` will make the iOS vault identical to the remote, this means that it will delete any file on the local vault that is not present on the remote. |