what command should I issue?
Snyder, Alexander J
alexander at snyderfamily.co
Sun Aug 4 18:35:37 MST 2024
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 <bmike1 at gmail.com> 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 <bmike1 at gmail.com> wrote:
>
>> thanks buddy. I got it worked through. sorry for the clutter.
>>
>>
>> On Sun, Aug 4, 2024 at 1:48 PM Snyder, Alexander J <
>> alexander at snyderfamily.co> 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 <
>>> plug-discuss at lists.phxlinux.org> 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: PLUG-discuss at lists.phxlinux.org
>>>> To subscribe, unsubscribe, or to change your mail settings:
>>>> https://lists.phxlinux.org/mailman/listinfo/plug-discuss
>>>>
>>>
>>
>> --
>> :-)~MIKE~(-:
>>
>
>
> --
> :-)~MIKE~(-:
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phxlinux.org/pipermail/plug-discuss/attachments/20240804/b49bf499/attachment.htm>
More information about the PLUG-discuss
mailing list