Moving file/folder by Cron

    • Scripts
    • Moving file/folder by Cron

      Hi,

      Now i might not explain this well! I dont want spoon feeding and i have searched, but i am not too sure what terms to search for or if what i am after is possible.

      I am on a shared host, i have access to Cron and FTP etc. One of the software packages i am thinking of using for something, has automated back up. Once or twice a day it save a copy into a subfolder in the applications main file tree.

      What i would like to do is get Cron to move (or copy and move), That backup file to say dropbox or the google equiv. Then when i start up my pc it will/should sync and download the file/folder.

      Is this possible, I assume i need to get Cron to run a 'script', this is where it falls down.......... What kind of script? Would this be Unix style commands in a file or python etc? I often here about writing scripts, but to me a script is python or PHP etc. So in this instant what kind of 'script' do i need to read up on?

      Obviously it is isnt critical i do this, but would simplify my life if it was automated.
    • A bash script (basically a Linux DOS batch file equivalent) would work fine.

      The issue is you cannot use rsync (which would be one of the better processes to do) so you will have to have an API to send from the command line to those services. AFAIK DropBox only supports uploading via their API, their website interface or through their APP's (phone/desktop).
      I'm pretty sure that Google Drive is the same.
      There may be some panel (cPanel, etc) applications that allow you to sync files from the "host site" to those services.

      The best solution (since most is a limitation of being on shared hosting) would be a VPS in which you could install rsync. Then you simply set up on your desktop to sync the files between the VPS and your desktop. Those files then can be in the DropBox shared directory that results in them being uploaded to DropBox.
    • I might have a temporary cludge for this, wordpress has a backup plug-in that backups and send to dropbox.

      It might be worth me looking at the plug-in and seeing how it does that. The site isnt a wordpress one, but i know a guy who might be able to do something similar for the software i am using.

      I remember old DOS batch files! sounds less scary now. I kind of miss Batch Files :D. Drop box etc keep lowering the storage limit! Alot of people are getting pretty annoyed about it, the last drop was from 15GB to 5GB.

      I have a WD mycloud at home, but i have to tether to a mobile phone for the internet, if i could find a way to open ports on the phone, i could use my own cloud and a web disk.

      Any recommendations on Linux books? I have some book vouchers to use :D.
    • I have ordered them thanks. Funny thing is a certain software package never ceases to amaze me. OCportal was rubbish, but composr is way better. It allows you to autosave backups to dropbox etc.

      Its got alot of features and yet you rarely hear of it, woltlab and xenforo are the ones people talk about, composr may be free buts its giving woltlab a good run. it also handles graphics better, and has a kind visual database thing as well.