-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sync to linux systems #1
Comments
Hello, thanks for your interest. Firstly: yes, the synchronizations of the two directories .config and .local should be two separate synchronizations. If I understand you correctly, you want one backup to be fed from two sources? Huuh. Let's initially think about updates of existing files: On source1, you edit an existing FILE_A. But what if FILE_A on source2 has been edited too? Then you have a conflict that should be resolved manually. Then, let's talk about new files: On source1, you create a new file FILE_B. What is essential: the two Zaloha instances source1/backup and source2/backup must have different metadata Last: automatic operations. Let me tell you that what you want to achieve is something complex that needs human oversight Yes simple backup cases can be automated. There is a section Automatic operations in the docu. Regards, F. |
Yes you did understand my situation correctly. If I understand correctly that would mean I can run one instance with the default settings from both sides to since into the same cloud folder. That is quite straightforward. If I would then want to sync from the cloud to the other system I would again call another instant with the correct parth from the cloud to the system. A synced scrip folder would need to be made executable again as I guess the permission would be lost. Am I correct? Nice work. |
I have also a problem with my .local folder. I can backup .local/bin/ but not .local/ as a full directory. It breaks on .local/share/ |
Hi, I would make both desktop2cloud and laptop2cloud setups symmetrical. On the cloud, you need two metadata directories (I explain later): In the following, for simplicity, I assume that all relative paths are relative to your home directory, on desktop, laptop and cloud. Also, on desktop: # Establish the SSH master connection
ssh -nNf -o ControlMaster=yes -o ControlPath='~/.ssh/cm-%r@%h:%p' 'user@cloud'
# Run Zaloha2.sh
./Zaloha2.sh --sourceDir=".config" \
--backupDir=".config" \
--backupUserHost='user@cloud' \
--sshOptions='-o ControlMaster=no -o ControlPath=~/.ssh/cm-%r@%h:%p' \
--scpOptions='-o ControlMaster=no -o ControlPath=~/.ssh/cm-%r@%h:%p -T' \
--revNew --revUp \
--metaDir=".Zaloha_metadata_config_desktop2cloud"
# Terminate the SSH master connection
ssh -O exit -o ControlPath='~/.ssh/cm-%r@%h:%p' 'user@cloud' And on laptop: # Establish the SSH master connection
ssh -nNf -o ControlMaster=yes -o ControlPath='~/.ssh/cm-%r@%h:%p' 'user@cloud'
# Run Zaloha2.sh
./Zaloha2.sh --sourceDir=".config" \
--backupDir=".config" \
--backupUserHost='user@cloud' \
--sshOptions='-o ControlMaster=no -o ControlPath=~/.ssh/cm-%r@%h:%p' \
--scpOptions='-o ControlMaster=no -o ControlPath=~/.ssh/cm-%r@%h:%p -T' \
--revNew --revUp \
--metaDir=".Zaloha_metadata_config_laptop2cloud"
# Terminate the SSH master connection
ssh -O exit -o ControlPath='~/.ssh/cm-%r@%h:%p' 'user@cloud' Now, why you need the two metadata directories (two 999 files, each in one directory): Today, you create FILE_B on the laptop, mtime = 10:00. Please note that the 999 file in Now run the desktop2cloud sync. The mtime 10:30 of FILE_B will now be compared with the mtime "yesterday" If it were compared with the mtime 10:30 of the 999 file in Therefore you need two metadata directories. Back to your two sources one backup idea: Zaloha is not, per design, a bi-directional synchronizer. Permissions: there are the options --pMode and --pRevMode for keeping modes during sync. Please keep this issue open, as a use-case based documentation, essentially. Regards, F. |
Regarding the AWKCHECKER error: Zaloha AWK: (330_source_clean.csv FNR:1463) Unexpected, column 5 of cleaned file is zero for a file: Column 5 is the file's last modification time (mtime), seconds since 01/01/1970. Zaloha checks that for files, it is numeric and not zero. Zero is a suspicious value for a file, so Zaloha aborts if it finds such case. Please go into your .Zaloha_metadata_temp directory, open file 330_source_clean.csv and go to line 1463. This should be the line with the fifth column zero. What is this file? If you run the "stat" command on that file, what does it say? Hmmm. Regards, F. |
Regarding the AWKCHECKER error: I think I have it. It is indeed possible to produce files that have modification time zero (01/01/1970). Proof here: $ touch -t 197001010100 testfile
$ find testfile -printf '%Ts\n'
0
$ rm testfile So the check is too stringent. On the other hand I want to check that FIND indeed reports meaningful mtimes on files and not zeros. Let me think about it. I make a new commit then. Thanks and regards, F. |
Hi, regarding the AWKCHECKER error: The commit is there. Now Zaloha reports a warning instead of an error, and only in case when all files on a device are reported with zero modification times by FIND. Individual files with zero modification times will not trigger the warning. Please re-try and let me know. Regards, F. |
Just for references. This is the line that breaks the script on .local/share/ I will check your new commit now |
works now. Thanks |
I just found your script and I love it.
What I would like to do is sync my ~/.config and ~/.local folder to my cloud service.
I would want to sync the files from 2 exactly identical systems to the "backup" in the cloud as I edit sometimes files on my desktop and sometimes on my laptop.
This way I would have 2 identical setups and a backup in the cloud.
How would you set Zaloha up for that?
Maybe you have an idea how to do that.
Thanks a lot
The text was updated successfully, but these errors were encountered: