1
Fork 0

add comments to sync_files function

This commit is contained in:
Joshua Goins 2022-10-11 21:18:30 -04:00
parent 26299ab999
commit 58ca4c3736

View file

@ -113,6 +113,9 @@ fn get_current_hostname() -> Option<String> {
} }
fn sync_files(config: &Config, from: &str, to: &str) { fn sync_files(config: &Config, from: &str, to: &str) {
// send first batch of files based on size alone
// works for media, since that doesn't change
// TODO: exclude database files entirely at this stage
Command::new("rsync") Command::new("rsync")
.args( .args(
["-rz", ["-rz",
@ -128,6 +131,9 @@ fn sync_files(config: &Config, from: &str, to: &str) {
.status() .status()
.expect("Failed to sync media files."); .expect("Failed to sync media files.");
// now this only includes database files
// this explicitly ignores size, as two databases can be the same "size" but may have different
// contents? i think that's why i wrote this lol
Command::new("rsync") Command::new("rsync")
.args( .args(
["-rzcv", ["-rzcv",