Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User error with setting up a remote host? #22

Open
DarrenPIngram opened this issue Dec 8, 2021 · 6 comments
Open

User error with setting up a remote host? #22

DarrenPIngram opened this issue Dec 8, 2021 · 6 comments

Comments

@DarrenPIngram
Copy link

DarrenPIngram commented Dec 8, 2021

May I possibly get a nudge in the right direction? I'm having problems getting the script to run using a remote rclone connection.

I have the following elements in the script:

source="/home/x/storage"            #the directory to back up (without a trailing slash)
dest="${dropbox_crypt_WS1bkp}:"              #the directory to back up to (without a trailing slash or "last_snapshot") destination=$dest/last_snapshot

With the objective to backup /home/x/storage/* (all from this point and downwards) to Dropbox location (config made in rclone) dropbox_crypt_WS1bkp. It passes the following command

Back up in progress 2021-12-08_11:52:12 WS1bkp_storage
rclone sync /home/x/storage :/last_snapshot --backup-dir=:/archive/2021/2021-12-08_11:52:12 --log-file=/home/x/scripts/rclone_jobber/WS1backup.log --log-level=INFO
ERROR: WS1bkp_storage failed.  rclone exit_code=1

but I am not getting sense into my head. I've tried adding the source without the dollar sign, without the curly brackets as well (different parts of the script/docs give the impression that they are left out, adding to my confusion).

Any guidance and pointers are welcome.

@NoLooseEnds
Copy link
Contributor

NoLooseEnds commented Dec 8, 2021

I think you are confusing some variables?

In your script put this variable the top, but below /bin/bash line:
remote=<your rclone remote name here from rclone config file>

Then you write (that pulls the name from the variable above):
dest="${remote}:"

@DarrenPIngram
Copy link
Author

DarrenPIngram commented Dec 9, 2021 via email

@NoLooseEnds
Copy link
Contributor

Happy to help. :)

You'll need to follow the log to see the progress. How much info you get in the log can you set using the --loglevel flag in the rclone command.

I have it hooked up to a slack webhook, so I get notified there when it succeeds or fails. Also have a monitoring service that triggers and sends me an email if it does not complete within a given timeframe.

@DarrenPIngram
Copy link
Author

I've set a cronjob http service and will see how that works. The backup is still running which is good (its only about 32Tb).
May I ask, whilst I have your attention, maybe a few other questions as I finalise the first job of many?

Is there any way (planned other backup) to have several sources linked into one backup job? I don't see anything in the documentation or examples in any case? Even if I make a file of paths and use source=file name?

@NoLooseEnds
Copy link
Contributor

32 TB is quite a bit, and would probably take quite a while.

You should look more into the basics of rclone. I.e filter_rules, you could add multiple sources there. Or you could make symlinks to one directory if that is easier.

This script is basicly just automating the backup part, while you should look into rclone for all the rest.

@DarrenPIngram
Copy link
Author

DarrenPIngram commented Dec 12, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants