0

I want make daily backups on my dropbox using rclone it works fine with cron but i want make it like this today i got folder test on my dropbox and tomorrow i want folder test1 and next tomorrow folder test2 instead overwriting test folder so i can get backup from 4 days instead yesterday (i dont know if u guys understand me my english is not perfect sorry)

script code (.sh):

#!/bin/sh
if [ -z "$STY" ]; then
  exec screen -dm -S backup -L -Logfile '/root/logs/log' /bin/bash "$0"
fi
rclone copy --update --verbose --transfers 30 --checkers 8 \
  --contimeout 60s --timeout 300s --retries 3 \
  --low-level-retries 10 --stats 1s \
  "/root/test/file" "dropbox:test"
exit

Ubuntu 18.10 64bit

Darius
  • 1,060
  • 2
  • 6
  • 17

1 Answers1

0

Simply use rclone move: https://rclone.org/commands/rclone_move/

 If it exists: move dropbox:test3 to dropbox:test4
 If it exists: move dropbox:test2 to dropbox:test3
 If it exists: move dropbox:test to dropbox:test2
 copy "/root/test/file" to "dropbox:test"
Nicolae Natea
  • 1,185
  • 9
  • 14