Create directory list for recovery

I need some help in finding the solution.

Situation:
Have a folder, with multiple directorys in there, which gets copied by rclone copy to gdrive.
Source directorys change, get deleted or added, but at the 'cloud' there should be always everything saved also if something got deleted..
Newest Rclone, Linux Debian, Gdrive

What I want:
Now I want to have a list of all actual 'source' directorys , which I can feed rclone with, to just recover that existing folders in case of some harddrive crash.

I don't think backup function would be the solution, because if I delete something at the source, the 'cloud folder' shouldn't be changed.

Thanks in Advace, keep on rockin, Rclone is so nice!

hello and welcome to the forum,

backup can work,
perhaps rclone sync and this flag.
you might read about this flag.
https://rclone.org/docs/#backup-dir-dir

1 Like

Okay thanks, I will have a look at it later and tell u if it fits :slight_smile:

Took a first look, and I ask me:
How can I recover the last state, after harddrive failed?

Would love to have a solution like, "ls" -> transform to rclone filter (?) readable format and use that list to recover after crash.

can you share your rclone copy command?

if you want to ls and filter then read this
https://rclone.org/filtering/

1 Like

Nothing special like:
rclone copy /sourcedir/dir1/ gdrive:dir1/ --fast-list

but also like
rclone copy /sourcedir/dir1/ gdrive:folder/dir2/dir1 --fast-list

How can I create the directory list for filtering?

rclone sync /sourcedir/dir1/ gdrive:dir1/backup --backupdir=gdrive:dir1/archive/date +%Y/%Y-%M/

and you use the date command so that each time you sync, any files that get deleted from source will be in the archive folder.

you would have a forever forward incremental backup

2 Likes

Yeah, thats how I interpeted 'sync' and backup command.

The thing is, in cloud folder the structure should always keep the same..

I think creating a filter list automated by ls would be my solution.
How to achive this?

if you want to ls and filter then read this
https://rclone.org/filtering/
and this
https://rclone.org/commands/rclone_lsd/

Note that rclone lsf makes output which you can feed straight into --files-from - does that help?

3 Likes

^^ Would sure help me :wink:

Same with rclone check output

I'm working on that at the moment :slight_smile: