11-28-2014, 08:06 AM
I'd like to ask local Linux gurus for help.
I have a linux system runing an MCServer instance (Gallery, on a RasPi). I'd like to have a script that:
- runs every N hours (N ~~ 24)
- packs folders "gal" and "world" and files "Gallery.cfg" and "Gallery.sqlite" into a 7z file
- names the resulting 7z file based on local date (and possibly time), format yyyy-mm-dd hh-mm-ss.7z
- uploads the resulting 7z file to a remote host running Linux via scp; scp needs to use a specified username and a private key in a specified file. The destination folder on the remote host should be based on the year and month of the upload (some/remote/path/yyyy-mm/yyyy-mm-dd hh-mm-ss.7z). The folder may need to be created if it doesn't exist.
- uploads the resulting 7z file to a remote SMB public-writable share, again in a folder named with year and month.
I have no idea how to write such a script, where to put it and how to register it so that it's run every day. Can you help me out? Thanks.
I have a linux system runing an MCServer instance (Gallery, on a RasPi). I'd like to have a script that:
- runs every N hours (N ~~ 24)
- packs folders "gal" and "world" and files "Gallery.cfg" and "Gallery.sqlite" into a 7z file
- names the resulting 7z file based on local date (and possibly time), format yyyy-mm-dd hh-mm-ss.7z
- uploads the resulting 7z file to a remote host running Linux via scp; scp needs to use a specified username and a private key in a specified file. The destination folder on the remote host should be based on the year and month of the upload (some/remote/path/yyyy-mm/yyyy-mm-dd hh-mm-ss.7z). The folder may need to be created if it doesn't exist.
- uploads the resulting 7z file to a remote SMB public-writable share, again in a folder named with year and month.
I have no idea how to write such a script, where to put it and how to register it so that it's run every day. Can you help me out? Thanks.