Siasync is a new utility that will monitor a folder and synchronize its contents to the Sia network. As new files are created or removed it will keep Sia in sync with the local source folder. Siasync also supports more advanced features like only syncing certain file extensions, or excluding certain file extensions, or archive mode which won’t delete files from Sia even if they are deleted locally. Best of all, it works on Windows, MacOS, and Linux.
Sounds Awesome, where do I get it?
Siasync binaries can be found on Github or by clicking the icon to the left. To install, just download the binary for your operating system and run it in your preferred command line utility.
Siasync works on Windows, MacOS, and Linux, but it is a command line only tool, you’ll have to run it from your operating systems’ command line. That’s the command prompt for you Windows people, and Terminal for you MacOS and Linux wizards. Simply download the Binary by clicking on your operating system icon above and rename the file to Siasync or Siasync.exe (if you’re on Windows).
Siasync assumes that you already have a running
siad daemon and are ready to upload files. Siasync does some basic checking of the allowance and contracts to ensure it can upload, but it does not resolve any issues it finds with your wallet or contracts. If you’re not sure how to run Sia and form storage contracts check out this blog post.
The most basic way to use Siasync is to have it stay 100% in sync with a local folder.
#> Siasync /tmp/foo
That will keep the local folder
/tmp/foo synced to Sia. As new files and folders are created they will be uploaded to Sia, as files and folders are deleted they will be removed.
Now let’s get fancy!
#> Siasync -include jpg,jpeg,gif,png,raw -archive true -address 127.0.0.1:4280 -subfolder demo -password <your-api-password> /tmp/foo/
Let’s break down this command one argument at a time:
-include jpg,jpeg,gif,png,raw — Only files with jpg, jpeg, gif, png, or raw file extensions will be synced. All other files will be ignored. More information on this flag and the
-exclude flag can be found in this Siasync case study.
-archive true — Never delete files from Sia, even if they are deleted locally.
-address 127.0.0.1:4280 — Use the Sia daemon running at
127.0.0.1:4280 instead of the default
-subfolder demo — Sync the files to the “demo” folder on Sia, instead of the default “siasync” folder. Siasync will create the “demo” folder if it doesn’t exist. You can see the files with
siac renter ls /demo/.
-password <your-api-password> — Use your API password instead of whatever API password Siasync was able to find. Siasync checks the default Sia locations and environment variables for API passwords.
/tmp/foo/ — The local folder you want synced to Sia.
What? Even More Features?
Yup, Siasync has a few more features, and a few Easter Eggs for you to find. You can view the complete list of flags from Siasync itself.
#> Siasync -h
usage: siasync <flags> <directory-to-sync>
for example: ./siasync -password abcd123 /tmp/sync/to/sia-address string
Sia's API address (default "127.0.0.1:9980")
Sia agent (default "Sia-Agent")
Files will not be removed from Sia, even if they are deleted locally
Comma separated list of file extensions to skip, all other files will be copied.
Comma separated list of file extensions to copy, all other files will be ignored.
Sia's API password
Folder on Sia to sync files too (default "siasync")
Wasn’t Siasync already a thing?
Eh, sorta, but not like this. Siasync was once a project maintained by Sia core developer Ava Howell. Unfortunately, Ava’s version of Siasync hasn’t been maintained for 2 years, doesn’t work with current versions of Sia, and doesn’t have any of the wicked-awesome features this one has. It was time to fork, renew, and improve the Siasync code; which is precisely what I’ve done. Thanks to Ava for giving me an excellent foundation to build something awesome!
Like what you see? Want to see more?
Beer money — Siacoin: