LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   GUI GNOME File Manager and PCManFM don't see my backup files - Ubunto 20.04 (https://www.linuxquestions.org/questions/linux-newbie-8/gui-gnome-file-manager-and-pcmanfm-dont-see-my-backup-files-ubunto-20-04-a-4175680929/)

alex4buba 08-23-2020 06:11 PM

GUI GNOME File Manager and PCManFM don't see my backup files - Ubunto 20.04
 
1 Attachment(s)
As one of my important stapes into the Linux world is - Backup, I finnaly managed to setup rsync / crontab to do the job.

This was with intensive help from several forum members here, I am thanking them again.

The problem however is that - I can see the backup files through a Terminal command, but in eiker of the above file managers, the backup folders in the external "Target" SD device show as empty.

Code:

alex@alex-nuc8i7hnk:~$ ls -l /media/New-SD-512/sun/alexfolders
total 84
drwxr-xr-x  7 alex alex 12288 Sep 18  2020  A-Beleura-Village
drwxr-xr-x  4 alex alex  4096 Sep 18  2020  A-BeleuraWeb
drwxr-xr-x  3 alex alex  4096 Aug 22 11:18  A-BondsandStocks
drwxr-xr-x  8 alex alex 36864 Aug 20 08:48  A-DOCS
drwxr-xr-x  6 alex alex  4096 Aug 21 18:53  A-DT_Ubuntu
drwxr-xr-x  2 alex alex  4096 Oct 18  2020  A-Exit
drwxr-xr-x 22 alex alex  4096 Oct  7  2020  A-NMAA_New
drwxr-xr-x  7 alex alex  4096 Oct 18  2020  A-Photo_Albums
drwxr-xr-x  6 alex alex  4096 Oct 18  2020  A-Sakura_Sushi
drwxr-xr-x  7 alex alex  4096 Sep 18  2020  A-Sq-125
drwxr-xr-x  2 alex alex  4096 Sep 15  2020 'System Volume Information'

Any suggestion are appreciated

Thank you
Alex

berndbausch 08-23-2020 09:01 PM

One possible explanation:

The folders named A-something are actually stored on the root filesystem. When you ran the ls command you saw the content of the root filesystem.

You then inserted the external storage medium, which is empty. Mounting the New-SD-512 filesystem hides the folders under /media/New-SD-512. You then view the empty New-SD-512 with the file explorers.

alex4buba 08-23-2020 09:09 PM

Quote:

Originally Posted by berndbausch (Post 6158929)
One possible explanation:

The folders named A-something are actually stored on the root filesystem. When you ran the ls command you saw the content of the root filesystem.

You then inserted the external storage medium, which is empty. Mounting the New-SD-512 filesystem hides the folders under /media/New-SD-512. You then view the empty New-SD-512 with the file explorers.

The A-xxxx folders are subfolders of the top folder - alexfolders on my main partition where my Linux OS is installed.
I placed those sub folders inside alexfolders for the only purpose so that my cron job has only one command to execute each day. Was this wrong to do?

In the target external SD storage, the alexfolders are to be created by the cron job. I have manually created on that target SD the folders sun,mon etc...

Please tell me how to do it better?

Thnaks
Alex

berndbausch 08-24-2020 01:54 AM

I am confused now. What is /media/New-SD-512/sun/alexfolders? Does it contain the files that you want to back up, or is it the backup? I understood it's the latter, but what you are saying now makes me wonder.

Also, what is New-SD-512? I understood it's an external device, like an SD card. Correct? When you ran the ls command, was that device inserted? The file explorer screenshot shows that the device is inserted.

alex4buba 08-24-2020 02:27 AM

Quote:

Originally Posted by berndbausch (Post 6158995)
I am confused now. What is /media/New-SD-512/sun/alexfolders? Does it contain the files that you want to back up, or is it the backup? I understood it's the latter, but what you are saying now makes me wonder.

Also, what is New-SD-512? I understood it's an external device, like an SD card. Correct? When you ran the ls command, was that device inserted? The file explorer screenshot shows that the device is inserted.

Hello Berndbush,

The New-SD-512 is a 512GB SD card inserted into an SD slot in my Intel-Nuc desktop
The line : /media/New-SD-512/sun/alexfolders says that in the root of the above SD there is a day folder - sun,mon,tue etc...
Inside each day folder, there is a single sub-folder call "alexfolders"
On my actual machine, in the HOME folder, I have a folder called "alexfolders" and inside it are all the folders I created. Here are all the folders and files that I want to backup, yes. I just put them all under ONE top folder, so that I can execute it with only one command per day.
Yes, the SD card is stuck in there permanently, otherwise my backup action will have no "Target".

Now, I hope you get the picture, maybe you can help me figure out, why am I able to have access to the backup files / folders through command line, but NOT through File Manager GUI

And one last thing, access rights on that New-SD-512 are all set to 777 from the root down

Cheers
Alex

berndbausch 08-24-2020 04:18 AM

Code:

drwxr-xr-x
This is not 777, but it's not relevant; you don't need the write bit for listing files.

I don't have an explanation. Can you reproduce the problem? I.e. run the ls command and use the file explorer at the same time, with the two different outcomes?

EDIT: Also, when you use the file explorer to create an object on the SD-Card, is that reflected in the ls output?

EDIT2: And run the df command. I have the suspicion that the ls command lists a different directory than the file explorer.

alex4buba 08-24-2020 04:56 AM

Quote:

Originally Posted by berndbausch (Post 6159026)
Code:

drwxr-xr-x
This is not 777, but it's not relevant; you don't need the write bit for listing files.

I don't have an explanation. Can you reproduce the problem? I.e. run the ls command and use the file explorer at the same time, with the two different outcomes?

EDIT: Also, when you use the file explorer to create an object on the SD-Card, is that reflected in the ls output?

EDIT2: And run the df command. I have the suspicion that the ls command lists a different directory than the file explorer.

Hello again, now it is my turn to be confused.

The problem is being reproduced consistantly since Saturday when I ran the first backup. The initial one of course took longer, and the follow ups, Sunday and I suspect today (in about 20 minutes) when it runs again - I can see the modified files in Terminal mode, but for the same folders on the SD card, those folders show as EMPTY.

Now, I checked it again in Command line (following your prompt here, I get the following:

Code:

alex@alex-nuc8i7hnk:~$ ls -l /media/alex/New-SD-512/sun
total 256
drwxrwxrwx 1 alex alex 131072 Aug 23 09:34 alexfolders

AND
Code:

alex@alex-nuc8i7hnk:~$ ls -l /media/alex/New-SD-512/sun/alexfolders
total 0

And the same result I have in GUI File explorer.... So, it seems my backup is gone

Yes, in the Source folder, I made changes today, copied them with the GUI File manager into the sat folder, they show up in the target through the GUI, The command line shows this :

Code:

alex@alex-nuc8i7hnk:~$ ls -l /media/alex/New-SD-512/sat
total 512
-rwxrwxrwx 1 alex alex    476 Aug 23 19:13 rsyncbatch
-rwxrwxrwx 1 alex alex 187649 Aug 20 10:44 TechChat.docx
-rwxrwxrwx 1 alex alex  6260 Aug 24 12:36 U_Steps.docx

Which is correct. So, if I do it through the GUI manually, the terminal shows it...

Whta do you make of this?

Thanks again

berndbausch 08-24-2020 05:56 AM

I guess that your backups are not on the SD card, but the root filesystem. To check this, unmount the SD card and look into /media/alex/New-SD-512/<days of the week>.

alex4buba 08-24-2020 06:16 AM

Quote:

Originally Posted by berndbausch (Post 6159043)
I guess that your backups are not on the SD card, but the root filesystem. To check this, unmount the SD card and look into /media/alex/New-SD-512/<days of the week>.

This is the result following your suggestion:

Code:

alex@alex-nuc8i7hnk:~$ ls -l /media/alex/New-SD-512/sat
ls: cannot access '/media/alex/New-SD-512/sat': No such file or directory

Removed the SD card...

So, any other suggestion?

Cheers
Alex

berndbausch 08-24-2020 06:27 AM

How about the other weekdays?

alex4buba 08-24-2020 07:23 AM

Quote:

Originally Posted by berndbausch (Post 6159053)
How about the other weekdays?

I started on Saturday, it shwos ONLY the files I copied manually by myself

If I run the following command in Terminal, it now does NOTHING. Is there a log I can check to see what did it do, or didn't and some errors?

Code:

rsync -aR /home/alex/alexfolders /media/New-SD-512/mon/
Thanks
Alex

berndbausch 08-24-2020 09:18 AM

Quote:

Originally Posted by alex4buba (Post 6159073)
I started on Saturday, it shwos ONLY the files I copied manually by myself

You mean /media/alex/New-SD-512 is empty?
Quote:

If I run the following command in Terminal, it now does NOTHING. Is there a log I can check to see what did it do, or didn't and some errors?

Code:

rsync -aR /home/alex/alexfolders /media/New-SD-512/mon/

Perhaps adding a verbose option helps? In any case, I don't see how this solves your problem.

michaelk 08-24-2020 09:24 AM

Code:

rsync -aR /home/alex/alexfolders /media/New-SD-512/mon/
By nothing /media/New-SD-512/mon is still empty? If there are no errors and rsync runs successfully there will no output and it will appear to do nothing. You can use the -v option to see additional output as rsync runs.

Since you are using the -R option and if the command did something your files will be /media/New-SD-512/mon/home/alex/alexfolders.

What is also interesting from your first post is that some of the files are from the future i.e Sep and Oct 2020... The System Volume Information' indicates you looked at the card from Windows.

sgosnell 08-24-2020 12:07 PM

I suspect the directory structure of the SD card is a mess by now. Try doing a directory listing of the entire card.
Code:

ls -a /media/New-SD-512
That will show all the subdirectories, but not the subdirectories below them. Then you can do individual listings of the subdirectories you see. If you post the output of the list of the card root, we might be able to offer more detailed suggestions.

alex4buba 08-24-2020 04:24 PM

Quote:

Originally Posted by sgosnell (Post 6159184)
I suspect the directory structure of the SD card is a mess by now. Try doing a directory listing of the entire card.
Code:

ls -a /media/New-SD-512
That will show all the subdirectories, but not the subdirectories below them. Then you can do individual listings of the subdirectories you see. If you post the output of the list of the card root, we might be able to offer more detailed suggestions.

There is no mess on the SD card, the only mess is in the stupid guy's head sitting in front of my computer.

It was staring me in the face...

Code:

The correct code should have been this:
00 20 * * 0 rsync -aR /home/alex/alexfolders /media/alex/New-SD-512/sun/

Instead of what I had:
00 20 * * 0 rsync -aR /home/alex/alexfolders /media/New-SD-512/sun/

Yes, all is working fine, the cron job executed OK this morning at 7 am

My final question, is my rsync command the correct one, or should I have -rR instead

What I am happy about the setup, is that if/when I add a folder inside alexfolders, I will NOT need to adjust the cron job

Thanks again
Alex

rnturn 08-24-2020 05:23 PM

Quote:

Originally Posted by alex4buba (Post 6159288)
My final question, is my rsync command the correct one, or should I have -rR instead

The rsync switches I've been using are:
Code:

--archive --itemize-changes --one-file-system --perms --owner --group --recursive
Works like s charm for me. (You might not need/want "--itemize-changes" ... I generate a log file that's emailed to me containing that information.

HTH...

alex4buba 08-24-2020 05:38 PM

Quote:

Originally Posted by rnturn (Post 6159299)
The rsync switches I've been using are:
Code:

--archive --itemize-changes --one-file-system --perms --owner --group --recursive
Works like s charm for me. (You might not need/want "--itemize-changes" ... I generate a log file that's emailed to me containing that information.

HTH...

I am new to all this, can you please answer my question, I am confused enough without extra options.
I am now using this : rsync -aR /home/alex/alexfolders /media/alex/New-SD-512/sun/

To do a recursive backup, into the same target folder - are my 2 arguments the best option?

Thanks
Alex

sgosnell 08-24-2020 05:49 PM

I think what you want is -r, not -R. Different utilities have different options, and rsync uses both -r and -R. The lowercase -r means recurse into subdirectories. Uppercase -R means use relative path names. You can see all the options by running
Code:

rsync --help
I also advise using the -a option, as -ar. Do not use -a -r syntax, just one dash - and the options together, as you are doing. All this is package specific. Every one has its own syntax and meaning, so you always have to either read the manual or at least run --help for every one of them. Each package has its own developer and maintainer, it's not like Microsoft which employs tens of thousands of coders to do it all one way. Linux developers are unpaid for the most part, and do it for the enjoyment of helping others. So some quirks must be overlooked. After all, it's free, and you get more than you pay for.

alex4buba 08-24-2020 06:46 PM

Quote:

Originally Posted by sgosnell (Post 6159308)
I think what you want is -r, not -R. Different utilities have different options, and rsync uses both -r and -R. The lowercase -r means recurse into subdirectories. Uppercase -R means use relative path names. You can see all the options by running
Code:

rsync --help
I also advise using the -a option, as -ar. Do not use -a -r syntax, just one dash - and the options together, as you are doing. All this is package specific. Every one has its own syntax and meaning, so you always have to either read the manual or at least run --help for every one of them. Each package has its own developer and maintainer, it's not like Microsoft which employs tens of thousands of coders to do it all one way. Linux developers are unpaid for the most part, and do it for the enjoyment of helping others. So some quirks must be overlooked. After all, it's free, and you get more than you pay for.

Hello again,

Now, you raised more wondering in my mind. I understand that Ubuntu comes as open source version of Linux. I can also see that some people took that and created new derivatives - kbuntu, xbuntu etc...

But, am I wrong in thinking that rsync is ONE single package, that package will use the same command line arguments in any distro of Ubuntu and its derivatives, or am I wrong?

In the process of moving my dayly backup from the SD card to the external 3TB WD disk, I ran the following command:

Code:

rsync -rv /home/alex/alexfolders /media/alex/Elements/mon/
After some 5 minutes ran, at the end I see:

Code:

sent 16,195,459,977 bytes  received 307,146 bytes  80,376,015.50 bytes/sec
total size is 16,190,478,561  speedup is 1.00

How come the number sent, is so much larger than the number received? I checked the final outcome and it seems the folders / files are all there on the drive.

-R is relative path, what does that mean? Relative to what? Otherwise, what is the path?

Cheers
Alex

scasey 08-24-2020 07:12 PM

As —help will show, -a includes -r and several other options. And I agree, -R is not necessary

Received bytes are those received back from the destination...probably acks or chechkbits.

man rsync is comprehensive...I’ve had to look up answers for several of your questions...you could read for yourself. If you’re not comfortable using it from the command line...which I get...any man page can usually be found on the web.

sgosnell 08-24-2020 09:32 PM

Rsync is the same everywhere. But every application is developed individually, and uses its own conventions. The options in rsync are not the same as in any other package, every one is a little different. There are some conventions, but they're only conventions, and don't have to be followed. That's why you need to read the manual
Code:

man <packagename>
for every one you use before you run it. Or at least try
Code:

packagename --help
That is mostly reliable, but even that doesn't work for every package. '-h' sometimes works for help, but it can easily mean something else entirely. That's something you just have to accept.

alex4buba 08-24-2020 10:39 PM

Quote:

Originally Posted by sgosnell (Post 6159370)
Rsync is the same everywhere. But every application is developed individually, and uses its own conventions. The options in rsync are not the same as in any other package, every one is a little different. There are some conventions, but they're only conventions, and don't have to be followed. That's why you need to read the manual
Code:

man <packagename>
for every one you use before you run it. Or at least try
Code:

packagename --help
That is mostly reliable, but even that doesn't work for every package. '-h' sometimes works for help, but it can easily mean something else entirely. That's something you just have to accept.

I understad, but my question remains - rsync specific.
Can I assume that rsync syntax is the same for all Ubuntu flavours?

Cheers
Alex

sgosnell 08-24-2020 10:42 PM

For Ubuntu, Debian, Fedora, or any other distro. The package is the same everywhere, although there may be changes between versions.

alex4buba 08-24-2020 10:47 PM

Quote:

Originally Posted by sgosnell (Post 6159388)
For Ubuntu, Debian, Fedora, or any other distro. The package is the same everywhere, although there may be changes between versions.

Ok, it is not a yes/ question

Cheers
Alex

ondoho 08-26-2020 01:40 AM

Quote:

Originally Posted by alex4buba (Post 6159303)
I am new to all this, can you please answer my question, I am confused enough without extra options.

You say that (or something similar) a lot.
Since you are well capable of writing in English, I must assume you are equally capable of reading it.
I suggest you take your newbie attitude as an inspiration to read a lot of documentation - in the case of rsync, I'm sure the man page will provide well-structured and ample material.
Most of your questions are best answered this way.

alex4buba 08-26-2020 03:01 AM

Quote:

Originally Posted by ondoho (Post 6159732)
You say that (or something similar) a lot.
Since you are well capable of writing in English, I must assume you are equally capable of reading it.
I suggest you take your newbie attitude as an inspiration to read a lot of documentation - in the case of rsync, I'm sure the man page will provide well-structured and ample material.
Most of your questions are best answered this way.

Hello again
I looked at your message and was pondering for several minutes, on how to react...

So, I decided to just say
Thank you


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