Current time: 01-18-2017, 05:08 AM Hello There, Guest! (LoginRegister)

Post Reply 
Backup Scripts for Dreamobjects
12-25-2016, 09:29 PM (This post was last modified: 12-25-2016 09:32 PM by legacy.)
Post: #11
RE: Backup Scripts for Dreamobjects
Sorry about that, I was typing all of that on my mobile with some horrible copy and paste from JuiceSSH app on my phone.

Q1. Yeah, I made that slightly confusing...trying to put all of the code up without missing anything was difficult even with my Samsung Note. Also /home/[PUTYOURUSERNAMEHERE]/bk/clean.sh in the bk.sh file should be /home/[PUTYOURUSERNAMEHERE]/mybk/clean.sh. That was my fault copy and pasting from my mobile SSH app. I left out the "my".

To further answer your question you have three files: bk.sh, clean.sh, and cleando.sh.

The process is something like this:

Cronjob runs bk.sh which makes a call for the file clean.sh at the end. The clean.sh file runs the cleando.sh file with the parameters set in the clean.sh file (bucket name and number of days).

The reason for clean.sh and cleando.sh files is that I cannot get the call working within the bk.sh script that is used in the clean.sh file. Don't know why, although when I use clean.sh to run the cleando.sh file it works. Working on multiple projects at the moment and this is pretty low priority since it works as is. If you can get it to work by including the line from clean.sh into the bk.sh file and it works, please let me know.

Q2. I made the no edits needed comment so that you will know that nothing needs to be changed with the code in that file (cleando.sh) you will use it as is. The only things you should edit is the [PUTYOUR...whatever...HERE] text in the bk.sh and clean.sh.

Q3. With this script, I am not sure how that would be accomplished. You can set the days for however long you want instead of 7 days and it will keep the files within that range. Anything after 7 days, or however many days you set it to, will be deleted.

This is what I do. I have another script that sends the backup via SFTP to a remote server and I keep those files for a month. I use DreamObjects to store my 7 days worth of backups.

Q4. boto should already be installed on VPS (https://help.dreamhost.com/hc/en-us/arti...mObjects).

As for the instructions for installing S3cmd, I would follow them to make sure everything is setup and ready.

I hope this helps and I didn't confuse things more for you. Let me know. I'm going to try to edit my original post to make the correction with the /home/[PUTYOURUSERNAMEHERE]/bk/clean.sh where I left out the "my" in the mybk directory.

If you want PM me and I will see if I can send you the files.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: