Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 07-29-2024, 06:32 PM   #16
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,441
Karma: 74317824
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Why not use the sleep command to wait for a predetermined time period rather than a while loop?
PeterT is offline   Reply With Quote
Old Yesterday, 10:03 AM   #17
ratinox
Fanatic
ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.
 
Posts: 536
Karma: 5060708
Join Date: Oct 2016
Device: Forma, iPad Air 4
Quote:
Originally Posted by sheepdog View Post
Code:
...
sleep 15
...
instead of your for loops.

Oh. PeterT made the same suggestion. Though there probably is (or should be) a better way to query the Dropbox software directly instead of waiting some arbitary time. You might also consider using rclone which is similar to rsync but for cloud storage services like Dropbox and OneDrive. I have used rclone for replication against OneDrive. It worked.
ratinox is offline   Reply With Quote
Old Yesterday, 11:04 AM   #18
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 75,237
Karma: 133361584
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Sirtel View Post
I'm pretty sure those who want to do it are going to do it anyway.
But at least they've been warned if they read this thread.
JSWolf is online now   Reply With Quote
Old Yesterday, 11:07 AM   #19
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 75,237
Karma: 133361584
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by sheepdog View Post
I certainly agree, that you cannot depend upon Dropbox alone, and you need to backup and check the libraries often. That said, here is a simple-minded script that works on my linux machine to do what was suggested:

Code:
deleted the code as I don't want to help anyone corrupt their library
Please make a new script that will use rsync to sync from your active library to your dropbox directory to be able to sync your library without risk of your active library becoming corrupt.

Also, please delete your existing script or others will use it and corrupt their library.
JSWolf is online now   Reply With Quote
Old Today, 09:21 AM   #20
ratinox
Fanatic
ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.ratinox ought to be getting tired of karma fortunes by now.
 
Posts: 536
Karma: 5060708
Join Date: Oct 2016
Device: Forma, iPad Air 4
Quote:
Originally Posted by JSWolf View Post
Please make a new script that will use rsync to sync from your active library to your dropbox directory to be able to sync your library without risk of your active library becoming corrupt.
rclone is the superior tool. It is designed specifically to work with cloud storage providers like Dropbox and OneDrive.
ratinox is offline   Reply With Quote
Old Today, 10:18 AM   #21
sheepdog
Junior Member
sheepdog began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Jul 2024
Device: calibre
Yes, corrected script follows:
Code:
#!/bin/bash

dropbox start
dropbox status
echo -n "SYNCING CALIBRE"
wait_time=15
i=0
while [ $i -le $wait_time ]; do
	sleep 1
	echo -n .
	((i++))
done
dropbox stop
echo -n "STOPPING DROPBOX"
i=0
while [ $i -le $wait_time ]; do
	sleep 1
	echo -n .
	((i++))
done
calibre 
echo - n "SYNCING DROPBOX"
i=0
while [ $i -le $wait_time ]; do
	sleep 1
	echo -n .
	((i++))
done
dropbox start
dropbox status
i=0
while [ $i -le $wait_time ]; do
	sleep 1
	echo -n .
	((i++))
done
dropbox stop
The Dropbox does not appear to have a method for querying the sync state. So the script uses an arbitrary wait time.

Last edited by sheepdog; Today at 10:21 AM. Reason: Adding information.
sheepdog is offline   Reply With Quote
Old Today, 11:50 AM   #22
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,441
Karma: 74317824
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Umm.. why not replace
Code:
i=0
while [ $i -le $wait_time ]; do
	sleep 1
	echo -n .
	((i++))
done
by
Code:
sleep $wait_time
Sure you won't get a snazzy dot being displayed every second but....
PeterT is offline   Reply With Quote
Old Today, 11:58 AM   #23
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 75,237
Karma: 133361584
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by ratinox View Post
rclone is the superior tool. It is designed specifically to work with cloud storage providers like Dropbox and OneDrive.
Does rclone do a one way sync to Dropbox and/or OneDrive?
JSWolf is online now   Reply With Quote
Old Today, 12:25 PM   #24
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,441
Karma: 74317824
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Quote:
Originally Posted by JSWolf View Post
Does rclone do a one way sync to Dropbox and/or OneDrive?
From the documentation
Quote:
rclone sync
Make source and dest identical, modifying destination only.
and yes, it supports DropBox and OneDrive
PeterT is offline   Reply With Quote
Old Today, 12:26 PM   #25
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,441
Karma: 74317824
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Quote:
Originally Posted by ratinox View Post
rclone is the superior tool. It is designed specifically to work with cloud storage providers like Dropbox and OneDrive.
Thanks for suggesting rclone. It's allowed me easy data backup from my pikapod app to local storage.
PeterT is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Calibre on multiple computers Waitingforatrain Library Management 2 09-19-2016 07:12 PM
calibre and multiple computers aielloj Calibre 4 06-26-2011 02:10 AM
How to Duplicate My Calibre Library on Multiple Computers? Sydney's Mom Related Tools 101 03-10-2011 12:14 PM
Using one Calibre Library (via Dropbox) on Multiple Computers PocketGoddess Related Tools 14 02-20-2011 04:15 AM
Multiple computers and Calibre starrigger Calibre 11 03-19-2009 12:14 PM


All times are GMT -4. The time now is 02:28 PM.


MobileRead.com is a privately owned, operated and funded community.