# Upload Assets via ssh?

**URL:** <https://forums.screenly.io/t/upload-assets-via-ssh/578>\
**Category:** Anthias\
**Created:** [June 17, 2021, 8:24pm UTC](https://forums.screenly.io/t/upload-assets-via-ssh/578 "2021-06-17T20:24:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![greenBucket](https://avatars.discourse-cdn.com/v4/letter/g/fbc32d/32.png) [@greenBucket](https://forums.screenly.io/u/greenBucket)\
**Post date:** [June 17, 2021, 8:24pm UTC](https://forums.screenly.io/t/upload-assets-via-ssh/578/1 "2021-06-17T20:24:24Z")

</div>

Can I use ssh (scp or rsync) to copy assets over into a new Screenly installation?

What location would I drop the assets into?  
And then, how can I tell screenly: you have them in /home/pi/media123, lets setup each schedule.

Would this be possible?

Thank you!

---

<div class="post-metadata">

**Author:** ![luisscreenly](https://avatars.discourse-cdn.com/v4/letter/l/90ced4/32.png) [@luisscreenly](https://forums.screenly.io/u/luisscreenly)\
**Post date:** [June 20, 2021, 1:54am UTC](https://forums.screenly.io/t/upload-assets-via-ssh/578/2 "2021-06-20T01:54:03Z")

</div>

I don’t have the complete answer for you, but this answers some of your question.  
/home/pi/screenly\_assets #dir where assets stored,  
The above dir is does not have your native filename, it has the asset ID as the filename, once you upload via the web interface an asset, it gets logged into the DB and a hex filename is your asset, eg. e779b0b8d4064d40b6df83cdfdf4  
How you would automate this part I don’t know.

I have an asset that I want to kick in at a specific time, then in the morning , revert to the regular day time assets, to do this I have to know which ID to activate via cron job, so I store the after hours assetID in a file, and throughout the regular hours, get the current active assets, something like this is the basics.  
Write a bash script to automate it all… BTW, I have this in pi’s crontab.

#this disables $assetid  
curl -u admin:mypass -H “Content-Type: application/json” --data ‘{“is\_enabled”: “0”}’ -X PATCH [http://localhost/api/v1.2/assets/$assetid](http://localhost/api/v1.2/assets/%24assetid)

#this enables $assetid  
curl -u admin:mypass -H “Content-Type: application/json” --data ‘{“is\_enabled”: “1”}’ -X PATCH [http://localhost/api/v1.2/assets/$assetid](http://localhost/api/v1.2/assets/%24assetid)

hope it helps.

---

<div class="post-metadata">

**Author:** ![greenBucket](https://avatars.discourse-cdn.com/v4/letter/g/fbc32d/32.png) [@greenBucket](https://forums.screenly.io/u/greenBucket)\
**Post date:** [June 22, 2021, 2:05pm UTC](https://forums.screenly.io/t/upload-assets-via-ssh/578/3 "2021-06-22T14:05:45Z")

</div>

@luisscreenly that actually helps.  
It gives me a more complete understanding of how screenly works in the backend.

I think what I’m going to do it is first download all assets off the screenly-rpi-#1.  
Then later copy them over via the web interface to the screenly-rpi-#2.

It’s a little bit running around, yet it’ll work for now.

Thank you!
