copy-synchronize folders & files -- How? [UNRESOLVED]
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
-
- Level 6
- Posts: 1173
- Joined: Sun Mar 10, 2013 8:08 pm
- Location: Mansfield, Ohio
copy-synchronize folders & files -- How? [UNRESOLVED]
Overview: I thought using 'rsync' resolved the problem, but it turns out that 'rsync' doesn't verify writes and can't be made to verify writes (regardless of what the 'rsync' documentation says), so this issue is still unresolved.
I need to automatically make a backup of my TBird profile on shutdown.
How to schedule it for shutdown I will leave for another day.
Today, I just want to learn how to create the backup.
It should copy-synchronize from '~/.thunderbird/0ysydkep.default' to '/media/sf_G_DRIVE/thunderbird/0ysydkep.default'.
It should be recursive.
It should delete files in '/media/sf_G_DRIVE/thunderbird/0ysydkep.default' that no longer exist in '~/.thunderbird/0ysydkep.default'.
It should skip files that have not changed.
I don't want to archive or compress, just copy.
I've been struggling with this off and on for days.
Any ideas?
Related: Is there a list of built-in commands? Submitting "help" produces an incomplete list.
I need to automatically make a backup of my TBird profile on shutdown.
How to schedule it for shutdown I will leave for another day.
Today, I just want to learn how to create the backup.
It should copy-synchronize from '~/.thunderbird/0ysydkep.default' to '/media/sf_G_DRIVE/thunderbird/0ysydkep.default'.
It should be recursive.
It should delete files in '/media/sf_G_DRIVE/thunderbird/0ysydkep.default' that no longer exist in '~/.thunderbird/0ysydkep.default'.
It should skip files that have not changed.
I don't want to archive or compress, just copy.
I've been struggling with this off and on for days.
Any ideas?
Related: Is there a list of built-in commands? Submitting "help" produces an incomplete list.
Last edited by LockBot on Fri Jan 06, 2023 11:00 pm, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: copy-synchronize folders & files -- How?
At first, copy the complete .thunderbird folder. This costs a few bytes, but it makes life easier in case, that you need the backup later for another computer.
Second: I recommend to use the backup-software BackInTime. For files, that have not been changed, it creates a hard link, that means near to no time needed and absolutely no space.
Third: Don't backup before shutting down, but if you boot. BackInTime can be set to do this backup automatically.
Second: I recommend to use the backup-software BackInTime. For files, that have not been changed, it creates a hard link, that means near to no time needed and absolutely no space.
Third: Don't backup before shutting down, but if you boot. BackInTime can be set to do this backup automatically.
-
- Level 6
- Posts: 1173
- Joined: Sun Mar 10, 2013 8:08 pm
- Location: Mansfield, Ohio
Re: copy-synchronize folders & files -- How?
Thank you for your suggestions, Cosmo. I don't want hard links. I just want to copy-synchronize.Cosmo. wrote: ⤴Wed Jul 06, 2022 1:38 pm At first, copy the complete .thunderbird folder. This costs a few bytes, but it makes life easier in case, that you need the backup later for another computer.
Second: I recommend to use the backup-software BackInTime. For files, that have not been changed, it creates a hard link, that means near to no time needed and absolutely no space.
Third: Don't backup before shutting down, but if you boot. BackInTime can be set to do this backup automatically.
Re: copy-synchronize folders & files -- How?
Do you have a reason?
If you want simply a copy, than do a copy, every time to another target subdirectory. Be prepared that after 1 week the needed space will be 7 times the original, after a month 30 times.
You can also use FreeFileSync. https://freefilesync.org/download.php. The tool is fine, but I would not name the result as backup; you used this word in the first sentence.
Re: copy-synchronize folders & files -- How?
use rsync:
note: sourcedir with backslash at the end, destdir without
rsync is very powerful and fast.
search the internet for "systemd hook at shutdown" to execute this at shutdown.
Code: Select all
rsync -rtv --delete /sourcedir/ /destdir
rsync is very powerful and fast.
search the internet for "systemd hook at shutdown" to execute this at shutdown.
Re: copy-synchronize folders & files -- How?
I use backintime to take care of everything in home. If I was going to use a script, I'd use rsync, or as an alternative to freefilesync - unison.
If you find this too difficult, get your script to shutdown the system.search the internet for "systemd hook at shutdown" to execute this at shutdown.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
-
- Level 6
- Posts: 1173
- Joined: Sun Mar 10, 2013 8:08 pm
- Location: Mansfield, Ohio
Re: copy-synchronize folders & files -- How?
The result has to be readable by Windows.
I don't want to do that.If you want simply a copy, than do a copy, every time to another target subdirectory. Be prepared that after 1 week the needed space will be 7 times the original, after a month 30 times.
Sorry. How about incremental backup?You can also use FreeFileSync. https://freefilesync.org/download.php. The tool is fine, but I would not name the result as backup; you used this word in the first sentence.
Re: copy-synchronize folders & files -- How?
This excludes the usage of a Linux file system.
Take a look at FreeFileSync, it has a number of synchronization options. It is also available for Windows. Only you can check and decide, if this is what you want.
-
- Level 6
- Posts: 1173
- Joined: Sun Mar 10, 2013 8:08 pm
- Location: Mansfield, Ohio
Re: copy-synchronize folders & files -- How?
That's an excellent idea!! I could change my "shutdown now" menu item to a shutdown script that does all sorts of things, ending with "shutdown now".
Last edited by markfilipak on Wed Jul 06, 2022 7:32 pm, edited 1 time in total.
-
- Level 6
- Posts: 1173
- Joined: Sun Mar 10, 2013 8:08 pm
- Location: Mansfield, Ohio
Re: copy-synchronize folders & files -- How?
What about this:
Code: Select all
rsync --delete --recursive --times ~/.thunderbird/0ysydkep.default/ /media/sf_G_DRIVE/~[.thunderbird][0ysydkep.default]
~[.thunderbird][0ysydkep.default]
-- not a typo.Do you see anything I should know? Any hazards? I value all opinions.
-
- Level 6
- Posts: 1173
- Joined: Sun Mar 10, 2013 8:08 pm
- Location: Mansfield, Ohio
Re: copy-synchronize folders & files -- How?
This is a wrap!
My shutdown script, 'shutdown.sh':
works. I'd be much happier with my profile out in a VBox shared folder (that can grow and grow and grow without bumpping into the fixed size of my virtual machine), but until Mozilla fixes their bugs -- Yeah, right! -- this will have to do.
Thanks, Cosmo. Thanks for suggesting rsync, Hans. And thanks, Andy, for the shutdown idea. You folks are the best.
My shutdown script, 'shutdown.sh':
Code: Select all
#!/bin/bash
echo Backing up '~/.thunderbird/0ysydkep.default/' as '/media/sf_G_DRIVE/~[.thunderbird][0ysydkep.default]'. Please wait.
rsync --delete --recursive --times ~/.thunderbird/0ysydkep.default/ /media/sf_G_DRIVE/~[.thunderbird][0ysydkep.default]
shutdown now
Thanks, Cosmo. Thanks for suggesting rsync, Hans. And thanks, Andy, for the shutdown idea. You folks are the best.