Initial questions about Odrive

Gentlemen,
A few days ago I installed Odrive and I’m really enjoying the tool.
My goal is to keep backup on the Amazon Cloud Drive.
The main thing is to sync a shared folder on the network with Amazon Drive.
This synchronization will be performed only on demand, we do not want automatic synchronization.
We will only use the Odrive CLI interface on the Linux operating system.

Being a beginner in the tool, some doubts arose, where I would like help here in the forum.

1 - Even reading the documentation, I still have doubts about the difference of the backup and sync commands. In which situation do I use these commands?
2 - To perform the initial backup (first copy of the folder), do I run the “backup” or “sync” command?
3 - To perform the backup or sync, do I need to have a folder created in the Cloud or can I back up the parent folder?
4 - How do I check the status (verbose) of the copy or sync of the files? How do I know if the backup or sync is running?
5 - To back up a shared folder on the network, do I need to copy this folder into the Amazon mount point, or can I point the backup to the local folder?
6 - If I need to recover files or folders that are in Amazon, which command do I execute to download these files to a local folder?
7 - Is it necessary to mount Amazon in a local folder only when I need to download a file or folder?

The commands I’m using for backup and sync are these:

For backup:
python “$HOME/.odrive-agent/bin/odrive.py” backup “/mnt/data/” “/Amazon Cloud Drive/data”

For sync:
python “$HOME/.odrive-agent/bin/odrive.py” sync “/mnt/data/” “/Amazon Cloud Drive/data”

I would like to get help on these questions, and know if I am using the commands correctly.
Thank you!

Hi @ti1,
Please take a look at these two posts here first, to give some background on the difference between backup and sync:

and the nature of the backup command in the CLI:

Since it sounds like your primary use case is periodic backup, sync is probably not the way to go. The beta backup feature may work for your needs.

Please see above

For backup you should create a new folder in the cloud to backup to, instead of targeting the root.

If you followed the instructions here to install: https://docs.odrive.com/docs/odrive-sync-agent then there is a backup.log file located in ~/.odrive-agent/log

As long as the folder is accessible via a local path, you will back it up the same as any other folder. type odrive.py backup -h for the syntax

You can use standard odrive sync to recover files (steps 4-6 here: https://docs.odrive.com/docs/odrive-sync-agent#section--using-odrive-sync-agent- ), or get them from the cloud storage directly (via their web interface, for example). The backup functionality is one-way, so it will not pull down any files from the cloud.[quote=“ti1, post:1, topic:2536”]
7 - Is it necessary to mount Amazon in a local folder only when I need to download a file or folder?
[/quote]

Technically you “mount” for both sync and backup. Similar to #6, though, you would need to mount for sync to download the files pushed up via backup.[quote=“ti1, post:1, topic:2536”]
For backup:
python “$HOME/.odrive-agent/bin/odrive.py” backup “/mnt/data/” “/Amazon Cloud Drive/data”

For sync:
python “$HOME/.odrive-agent/bin/odrive.py” sync “/mnt/data/” “/Amazon Cloud Drive/data”
[/quote]

The sync command is used to sync a file or folder, and isn’t use to mount in this way. You use the “mount” command to mount a location for syncing. For example:
python “$HOME/.odrive-agent/bin/odrive.py” mount “/mnt/data-sync/” “/Amazon Cloud Drive/data”
then
python “$HOME/.odrive-agent/bin/odrive.py” sync “/mnt/data-sync/myfile.txt.cloud”

Your backup and sync mounts should be different local folders so you don’t end up with cyclical syncing and potentially other oddities.

Hello Tony,
Thank you for the informations.
Now it’s clear the issue of backup and sync features.

In the case of question number 6, using CLI, I was not able to recover / restore only one file that is in the cloud.
Because I only view the parent folder where the files were copied. To synchronize / restore only one file, do I need to sync the entire parent folder?

Hi @ti1,
You would need to sync the .cloudf (placeholder folder) to expose its contents. This will not download all of the files, however. From there you can sync the one file (.cloud placeholder) you need.

Perfect,
You must synchronize folder by folder until you reach the file you want to restore.
Thank you for your support.

1 Like