# Looking to Sync files back and forth



## Alita (May 11, 2020)

When I use to have windows 7 I had a  program called syncback  where I was able to sync between drives or folders any new content.

I wonder if there is a package or port like this.


----------



## SirDice (May 11, 2020)

De facto standard tool: net/rsync


----------



## obsigna (May 11, 2020)

sysutils/clone. See the -s option in clone(1). It got another useful option -i, which incrementaly updates new files from the source without changing files in the target which do not exist in the origin. Then we may revert synching, using the -s option in order the origin gets all the newest files as well. Note, clone works on mounted files systems only, while rsync can be used for remote synching as well.


----------



## Alita (May 11, 2020)

obsigna said:


> sysutils/clone. See the -s option in clone(1). It got another useful option -i, which incrementaly updates new files from the source without changing files in the target which do not exist in the origin. Then we may revert synching, using the -s option in order the origin gets all the newest files as well. Note, clone works on mounted files systems only, while rsync can be used for remote synching as well.



Well that may be a problem I have as I want files that do not exist to the target to be copied from the source, or a better file manager?
Yes I usually use terminal but I wanna want to be careful with all the permission stuff so I just copy from home as user and not root.

Sometimes I try to copy a directory from one drive to another and first it says I need 170 gigs more  (because it thinks I wanna want to to write copy all files over again), even if i intent on skipping, overwriting anything and just copying files when I know there is enough space but it assumes I want to copy everything all together again, then when I choose skip all it choose not to copy anything at all.


----------



## kpedersen (May 11, 2020)

I tend to use Git. In particular the *--git-dir=* option to use an external .git folder location. Then I pretty much just do (in a small script file):


```
$ git add .
$ git pull
$ git commit
$ git push
```

This only fails if there is a conflict. In which case manual intervention is needed anyway like in drop box.


----------



## jb_fvwm2 (May 11, 2020)

Alita said:


> Well that may be a problem I have as I want files that do not exist to the target to be copied from the source, or a better file manager?
> Yes I usually use terminal but I wanna want to be careful with all the permission stuff so I just copy from home as user and not root.
> 
> Sometimes I try to copy a directory from one drive to another and first it says I need 170 gigs more  (because it thinks I wanna want to to write copy all files over again), even if i intent on skipping, overwriting anything and just copying files when I know there is enough space but it assumes I want to copy everything all together again, then when I choose skip all it choose not to copy anything at all.




```
df
................
/
/home
/mnt/home
..........
cd home
# home ## rsync -vaHX --delete-delay  --partial --stats --numeric-ids --inplace
                        --archive --backup --one-file-system --hard-links --bwlimit=1000
                         --specials  .   /mnt/home
```
                                              ^^^ careful with the SOURCE dot...
..................................
this command should do what you want 
if I understand your post
but to be sure add " --dry-run" to test


----------



## Alita (May 12, 2020)

kpedersen said:


> I tend to use Git. In particular the *--git-dir=* option to use an external .git folder location. Then I pretty much just do (in a small script file):
> 
> 
> ```
> ...


----------



## Alita (May 12, 2020)

jb_fvwm2 said:


> ```
> df
> ................
> /
> ...



Yes good idea for the dry run test first
thank You


----------

