LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-20-2022, 06:33 AM   #1
Grobe
Member
 
Registered: Aug 2019
Location: Close to north
Distribution: Fedora
Posts: 117

Rep: Reputation: Disabled
rsynk -L - any methods to prevent uncontrollable file grabbing (rare backup setup)


Hi.

First - let me describe how my backup routine is put together:
  • On a usb stick, there is one folder that only contains symlinks. That is links that points to folders and files that I intended to backup as a daily routine.
  • This setup works perfectly as backup with versioning. There are no issue that need to be fixed.
  • The full backup command goes: rsync -bmrtv -L --delete-after --backup-dir='/usbstick/versioning/'$(date +"%Y%m%d_%H%M") --log-file='/usbstick/versioning/rsync-log.log' '/usbstick/collection-of-symlinks/' '/usbstick/backup/'

As it is today, that works nice, but in the future I don't want a symlink happens to be created somewhere inside the directories that the symlinks poining to (because it may fill up the usb stick).

And there is the problem. If i remove the -L parameter of rsynk, that will also make rsynk not taking backup of anything.

I know very well I can make a script parsing each symlink and then just remove the -L parameter, but is there another way to achieve this still just running one command ?
 
Old 11-20-2022, 06:44 AM   #2
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,335
Blog Entries: 3

Rep: Reputation: 3731Reputation: 3731Reputation: 3731Reputation: 3731Reputation: 3731Reputation: 3731Reputation: 3731Reputation: 3731Reputation: 3731Reputation: 3731Reputation: 3731
Quote:
Originally Posted by Grobe View Post
As it is today, that works nice, but in the future I don't want a symlink happens to be created somewhere inside the directories that the symlinks poining to (because it may fill up the usb stick).
I'm not quite clear on what your goal is, perhaps you could expand a little on what you are trying to do.

If you want the file copied instead of the symlink, then try the --copy-links option. But if you want to skip over directories which happen to be symlinks then maybe the --safe-links might work. That tells rsync not to copy stuff outside the directory hierarchy.
 
  


Reply

Tags
backup, symlinks



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
P50 Xeon 4k and woefully uncontrollable vbox guest scaling rbcash Linux - Laptop and Netbook 4 08-22-2021 05:05 PM
Do you guys use any methods to prevent random people from accessing your flashdrive's contents? greenace92 General 16 01-26-2016 01:20 PM
Mouse uncontrollable on suse 9.1 using kde daceo SUSE / openSUSE 8 06-19-2005 04:32 AM
Uncontrollable Mouse in RH9 gavinc Linux - Newbie 2 11-14-2003 06:06 AM
Uncontrollable Screen Blanking Daruma Linux - Newbie 1 01-11-2002 09:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration