Re: what command should I issue?

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
+ (text/plain)
Delete this message
Reply to this message
Author: Snyder, Alexander J via PLUG-discuss
Date:  
To: Michael
CC: Snyder, Alexander J, Main PLUG discussion list
Subject: Re: what command should I issue?
I would do things differently, but that's probably a "Coke Vs. Pepsi"
argument.

--
Thanks,
Alexander

Sent from my Google Pixel 7 Pro

On Sun, Aug 4, 2024, 11:13 Michael <> wrote:

> this is what the final product looks like. DO you recommend a change?
>
> !/bin/bash
>
> # Define source and destination
> SOURCE="/home/bmike1/"
> DESTINATION="/media/rsync/backup/"
> LABEL="rsync" # Label of your drive
>
> # Define rsync options
> OPTIONS="-av --delete --exclude='*.lock' --exclude='google-chrome/'
> --exclude='>
>
> # Ensure the destination directory exists
> if [ ! -d "$DESTINATION" ]; then
> mkdir -p "$DESTINATION"
> fi
>
> # Mount the drive if it's not already mounted
> if ! mountpoint -q "$DESTINATION"; then
> echo "Mounting the drive..."
> sudo mount -L "$LABEL" "$DESTINATION" || { echo "Failed to mount drive
> with l>
> fi
>
> # Run rsync command
> rsync $OPTIONS $SOURCE $DESTINATION
>
> # Wait for user input before exiting
> echo "Backup completed. Press any key to exit."
> read -n 1 -s
>
>
>
> On Sun, Aug 4, 2024 at 2:06 PM Michael <> wrote:
>
>> thanks buddy. I got it worked through. sorry for the clutter.
>>
>>
>> On Sun, Aug 4, 2024 at 1:48 PM Snyder, Alexander J <
>> > wrote:
>>
>>> Well, I mean that'll get stuff sure -- but I'm not sure what you're
>>> trying to do.
>>>
>>> Remember, ChatGPT will only point you in the right direction ... Like
>>> you're sledding in winter, it'll point you towards the downhill side, but
>>> it won't stop you from crashing ... You've got to bring SOMETHING to the
>>> table.
>>>
>>> What is your goal? Tell me in plain English what you're trying to
>>> accomplish and I can help you write a command, or script, to do that.
>>>
>>> Feel free to ping me directly, to keep the distro uncluttered.
>>>
>>> --
>>> Thanks,
>>> Alexander
>>>
>>> Sent from my Google Pixel 7 Pro
>>>
>>> On Sun, Aug 4, 2024, 10:25 Michael via PLUG-discuss <
>>> > wrote:
>>>
>>>> I'm running around in circles with chat gpt. I want to backup
>>>> /home/bmike1 user created data and all other pertinent files.
>>>> This is what it tells me:
>>>>
>>>> #!/bin/bash
>>>> # Define source and destination
>>>> SOURCE="/home/bmike1/"
>>>> DESTINATION="/media/rsync/backup/" # Define rsync options
>>>> OPTIONS="-av --delete --exclude='*.lock' --exclude='google-chrome/'
>>>> --exclude='firefox/' --exclude='thunderbird/'"
>>>> # Run rsync command
>>>> rsync $OPTIONS $SOURCE $DESTINATION
>>>>
>>>> WIll this do it for me?
>>>> As for the pertinent files I did this before and there was a few other
>>>> directories involved. do I need to worry about it?
>>>> ---------------------------------------------------
>>>> PLUG-discuss mailing list:
>>>> To subscribe, unsubscribe, or to change your mail settings:
>>>> https://lists.phxlinux.org/mailman/listinfo/plug-discuss
>>>>
>>>
>>
>> --
>> :-)~MIKE~(-:
>>
>
>
> --
> :-)~MIKE~(-:
>

---------------------------------------------------
PLUG-discuss mailing list:
To subscribe, unsubscribe, or to change your mail settings:
https://lists.phxlinux.org/mailman/listinfo/plug-discuss